Re: Multiple rows returned ?. . .

From: Date: Wed, 14 Mar 2001 17:00:51 +0000
Subject: Re: Multiple rows returned ?. . .
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-43896@lists.php.net to get a copy of this message
while loop while($row = mysql_fetch_array($result)) { //do something. } -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph. 250.376.2690 fx. 250.554.1120 lee@mediawaveonline.com ""Mrvball008"" <mrvball008@hotmail.com> wrote in message news:OE45B6gVs1tIzmQVuRW000055aa@hotmail.com... Hi I have little tiny script like so.. >--------- <? >$dbName = "somedb"; >$dbPass = "somepass"; >$dbUserName = "someuser"; >$host = "localhost"; >$db = mysql_connect($host, $dbUserName, $dbPass) or die ("Could not connect to database"); >mysql_select_db($dbName,$db); $sql = "SELECT * FROM downloads"; $result = mysql_query($sql, $db); $row = mysql_fetch_array($result); $row1 = mysql_fetch_array($result); ?> ----------- no I know there has to be a more efficient way of returning the $row and $row1 without writing it down like so.. anyone one can throw me a clue? :) Thank Andre -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#43896) next »