$list = mysql_query("select id,title from table1");
while ($row = mysql_fetch_array($list)) {
echo("$row[title]\n");
}
-Original Message-
From: Eric J Schwinder
[mailto:[EMAIL PROTECTED]]
Sent: den 1 oktober 2001 20:18
To: [EMAIL PROTECTED]
Subject: Re: [
Thanks to everyone who replied either here or via e-mail... I got a lot of
great suggestions. I ended up solving the WHILE problem by changing this:
> $list = mysql_query("select id,title from table1");
> $list_row = mysql_fetch_array($list);
> $title = $list_row["title"];
> while($list_row) {
>
the mysql_query function returns a Result Identifier. For every row in the
result (found by mysql_num_rows), you must call one of the the row
retrieval functions (mysql_fetch_array, mysql_fetch_object, etc...) These
functions automatically advance the row position in the Result.
Replace the