RE: [PHP] more results (loop)

From: Date: Fri, 11 Apr 2003 14:17:22 +0000
Subject: RE: [PHP] more results (loop)
Groups: php.general 
Request: Send a blank email to php-general+get-143503@lists.php.net to get a copy of this message
Your problem with the code below is that you're mysql_fetch_row on $result2 instead of $result... -----Original Message----- From: Sebastian [mailto:sebastian@dslr.net] Sent: Friday, April 11, 2003 10:11 PM To: php list Subject: [PHP] more results (loop) I've seem to have forgotten how to do a loop. how do i get more results when the echo is not in the while loop? only getting 1 now... $result = @mysql_query("SELECT * FROM news ORDER BY id DESC LIMIT 3"); while($row = mysql_fetch_row($result2)) { $title = $row[2]; $text = $row[3]; } // other queries.... echo "$title <br/> $text"; cheers, - Sebastian

« previous php.general (#143503) next »