Jump to content

while ($row = mysql_fetch_array($retid))


n8w

Recommended Posts

I want to walk through the mysql_fetch_array twice

 

currently I am just running the same sql statement twice

 

$retid = mysql_query( $sql);

$retid2=mysql_query( $sql);

 

Which, I know isn't effecient making two calls to the db when I already have the info

 

What is the best way to walk through the result twice?

 

similar to

while ($row = mysql_fetch_array($retid)) {

//my code

}

 

other stuff

 

while ($row = mysql_fetch_array($retid2)) {

//my code

}

Link to comment
https://forums.phpfreaks.com/topic/244871-while-row-mysql_fetch_arrayretid/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.