[PHP] Repeat Region Error

2008-12-21 Thread Gary Maddock-Greene
Hi All, I am getting the following error - Warning: mysql_fetch_assoc(): 3 is not a valid MySQL result resource in I think it has something to do with my Dreamweaver created code for a repeat region. The head code is: ?php if (!function_exists(GetSQLValueString)) { function

[PHP] repeat region

2002-12-18 Thread Bruce Levick
Hi php'ers, I have learnt alot in the last week in regards to php and listing the rows of a table set. I need help with a small challenge. I can retrieve rows from a database table and list the results in HTML tr cell successfully. My challenge is this. I want to list the I.D (auto increment id

Re: [PHP] repeat region

2002-12-18 Thread Justin French
Hi, what you want to do is only echo the tr and /tr every 7 loops through the records. Untested example: table ? $i = 0; $sql = SELECT id FROM table name; $result = mysql_query($sql); while($myrow = mysql_fetch_array($result)) { $i++; if($i == 1) { echo tr; } echo