On Wednesday 14 March 2001 14:41, you wrote:
> > $result= mysql_query($query);
> > while ($row = mysql_fetch_row($result));
> > {
> > for ($i =1;$i<mysql_num_fields($result);$i++)
> > {echo $row[$i];
> > }}
> > ?>
>
> 2 problems.
>
> 1. Delete the ';' after the while loop. With that there the for loop
> will never run.
It will. Once. First it fetches all matching rows from the database (each
time overwriting previous results):
> > while ($row = mysql_fetch_row($result));
Then it executes the code after the while:
> > {
> > for ($i =1;$i<mysql_num_fields($result);$i++)
> > {echo $row[$i];
> > }}
--
Christian Reiniger
LGDC Webmaster (http://sunsite.dk/lgdc/)
CPU not found. retry, abort, ignore?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]