accessing mysql_fetch_array more than once?

From: Date: Fri, 17 May 2002 02:31:19 +0000
Subject: accessing mysql_fetch_array more than once?
Groups: php.general 
Request: Send a blank email to php-general+get-98130@lists.php.net to get a copy of this message
Hi all, Howcome, when I do a SQL lookup, I can only access the array once? Say, I have... <? $SQL = mysql_query("SOME SELECT STATEMENT"); while ($var = mysql_fetch_array($SQL)) { echo $var['columbname']; } // that works, and prints out the rows in the table // my codes continues..... ?> <some more html crap> <? while ($var = mysql_fetch_array($SQL)) { echo $var['columbname']; } // Now, the array doesn't print anything... ?> -- me

« previous php.general (#98130) next »