Re: PHP + MySQL looping question

From: Date: Thu, 01 Jan 1970 00:00:00 +0000
Subject: Re: PHP + MySQL looping question
Groups: php.general 
Request: Send a blank email to php-general+get-128076@lists.php.net to get a copy of this message
Mark, Try looking at : http://www.php.net/manual/en/function.mysql-data-seek.php and see if that function gives you the desired result. HTH -Brad > I was wondering if there is a easy way to loop through the same SQL results > many times. > I have a for loop that loops 3 time. Each time I want to loop through the > SQL result printing. > > The end result is printing the SQL results 3 times in a order. > > The problem is I have to reset the SQL result array on each for loop. How do > you do that? > > for ($i = 1; $i <= 3; $i++) { > while ($row = mysql_fetch_array($result)) { > //Some Code > echo $row['filed']; > } > //Reset $result - SQL result > } > > Thanks, Mark. > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#128076) next »