Jump to content

damianharvey

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://www.portobello.net.au

Profile Information

  • Gender
    Not Telling
  • Location
    Sydney, Australia

damianharvey's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi all, I have a problem where I am trying to display the contents of a table joined with a description field joined from another table. The resulting HTML table generates completely randomly. Sometimes it\'s fine. Other times it is stuffed (see screen dump - http://www.users.bigpond.com/damianharvey/table1.jpg ) It\'s not always the same rows that are stuffed either. Sometimes it also gives me the \"The page cannot be displayed\" error. My SQL Statement is: select * from inventory left join shirt_type on shirt_type.type = inventory.shirt_type ORDER BY inventory.design_name, inventory.design_colour and I have no problem with this in my ODBC SQL Query program. My PHP code is (roughly) : <?php require_once(\'Connections.php\'); ?> <?php mysql_select_db($database_Test, $Test); $query_inventory = \"select * from inventory left join shirt_type on shirt_type.type = inventory.shirt_type ORDER BY inventory.design_name, inventory.design_colour\"; $inventory = mysql_query($query_inventory, $Test) or die(mysql_error()); $row_inventory = mysql_fetch_assoc($inventory); $totalRows_inventory = mysql_num_rows($inventory); ?> //then some other stuff <table> <?php do { ?> <tr> <td><?php echo $row_inventory[\'design_name\']; ?></td> <td><?php echo $row_inventory[\'design_colour\']; ?></td> <td><?php echo $row_inventory[\'shirt_colour\']; ?></td> <td><?php echo $row_inventory[\'shirt_size\']; ?></td> <td><?php echo $row_inventory[\'description\']; ?></td> <td><?php echo $row_inventory[\'quantity\']; ?></td> <td><?php echo \"<a href=\"Cart.php?action=ADD&design_name=\".$row_inventory[\'design_name\'].\"&design_colour=\".$row_inventory[\'design_colour\'].\"&shirt_colour=\".$row_inventory[\'shirt_colour\'].\"&shirt_size=\".$row_inventory[\'shirt_size\'].\"\" target=\"_self\">Buy One</a>\" ?></td> </tr> <?php } while ($row_inventory = mysql_fetch_assoc($inventory)); ?> Has anyone seen something like this before? I am running Apache 1.3.23 and PHP4. Thanks in advance. Damo
×
×
  • 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.