Jump to content

mlk77

New Members
  • Posts

    5
  • Joined

  • Last visited

mlk77's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks for the reply.. I gave up on that version and downloaded a older version.for some reason his older versions actually look like coding that I can understand. I don't know what was going on on the current version at all. I have the older version working much better. I did start to redo it and figures with all the files it wasn't worth it as you said. I just need to change a few things in that version for photos and should be set. Thanks again!!
  2. Is this what you need? INSERT INTO `tanklogger`.`tanks` ( `tank_id` , `tank_name` , `setup_date` , `tank_size` , `tank_desc` ) VALUES ( '1', 'Main Tank', '2013-05-19 22:59:12', '60', 'Main fish tank in the kitchen' );
  3. The last code is the full php file that I'm having the problem with. I have it running on a local server that don't have access to the outside. The Script is called Tanklogger and is on Source Forge but the demo isn't working. It's for keeping informtion on my fish tanks. When it adds information to the data base it should be the tank name, decription of the tank,tank size and the date I set it up. The table for the SQL is CREATE TABLE tanks (tank_id int unsigned auto_increment primary key, tank_name tinytext not null, setup_date datetime not null, tank_size mediumint unsigned not null, tank_desc text not null); I can go in phpmyadmin and change the first tank id to 3 and the second tank information will show. Right now I have 3 tanks listed but the script is only grabbing the first one.
  4. The complete code for this file is below. It will only show the first entry in the database. I'm trying it on ubuntu server 12.04 <?php /* This file is part of TankLogger. TankLogger is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. TankLogger is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with TankLogger; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Copyright 2002, 2003, 2004 Jason Nugent jnugent@ns.sympatico.ca */ unset ($tanks); require_once("./inc/general_functions.php"); require_once("./inc/Calendar.php"); getHeader(getcwd()); ?> <h2 class="center">Tanks that TankLogger is currently storing data for:</h2> <?php print getBreadCrumb(); $units = getUnits(); $tanks = getTankObjects(); foreach ($tanks AS $tank) { print "<table cellpadding=\"3\" cellspacing=\"0\" width=\"80%\" class=\"contentTable\" align=\"center\">\n"; print "<tr><td><h3>" . $tank->tank_name . " (<a href=\"./livestock.php?tank_id=" . $tank->tank_id . "\">view livestock for this tank</a> | <a href=\"./expenses.php?tank_id=" . $tank->tank_id . "\">view expenses for this tank</a>)</h3></td></tr>\n"; print "<tr><td>Tank Size: " . $tank->tank_size . " " . $units['size_unit'] . " (" . convertSize($tank->tank_size, $units['size_unit']) . ") </td></tr>\n"; print "<tr><td>" . $tank->tank_desc . "</td></tr>\n"; print "</table><br />\n"; } displayVersion(); getFooter(getcwd()); ?>
  5. I got a script that I'm going to run on my home server and the coder no longer has anything to do with this project and I can't seem to reach him. I installed everything but it's only grabbing the information from the first table. I've been messing around with it and can't seem to figure it out. Ay help would be great! unset ($tanks); require_once("./inc/general_functions.php"); require_once("./inc/Calendar.php"); getHeader(getcwd()); ?> <h2 align="center" class="center">Fish Tank Database </h2> <?php print getBreadCrumb(); $units = getUnits(); $tanks = getTankObjects(); foreach ($tanks AS $tank) { print "<table cellpadding=\"3\" cellspacing=\"0\" width=\"80%\" class=\"contentTable\" align=\"center\">\n"; print "<tr><td><h3>" . $tank->tank_name . " (<a href=\"./livestock.php?tank_id=" . $tank->tank_id . "\">view livestock for this tank</a> | <a href=\"./expenses.php?tank_id=" . $tank->tank_id . "\">view expenses for this tank</a>)</h3></td></tr>\n"; print "<tr><td>Tank Size: " . $tank->tank_size . " " . $units['size_unit'] . " (" . convertSize($tank->tank_size, $units['size_unit']) . ") </td></tr>\n"; print "<tr><td>" . $tank->tank_desc . "</td></tr>\n"; print "</table><br />\n";
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.