Asheeown Posted January 31, 2007 Share Posted January 31, 2007 Is it possible to do this command twice with one query? or do I have to do it a certain other way Link to comment https://forums.phpfreaks.com/topic/36436-solved-mysql_fetch_assocx2/ Share on other sites More sharing options...
Jessica Posted January 31, 2007 Share Posted January 31, 2007 Why would you want to? Link to comment https://forums.phpfreaks.com/topic/36436-solved-mysql_fetch_assocx2/#findComment-173378 Share on other sites More sharing options...
Asheeown Posted January 31, 2007 Author Share Posted January 31, 2007 I'm importing the results into a file under an if condition, then i'm displaying the results to the user, but the database is long so having two of the same query is kind of time wasting Link to comment https://forums.phpfreaks.com/topic/36436-solved-mysql_fetch_assocx2/#findComment-173380 Share on other sites More sharing options...
Hypnos Posted January 31, 2007 Share Posted January 31, 2007 I think this will do it:[code=php:0]while ($row = mysql_fetch_assoc($result)) { // do stuff}mysql_data_seek($result, 0);while ($row = mysql_fetch_assoc($result)) { // do stuff again}[/code] Link to comment https://forums.phpfreaks.com/topic/36436-solved-mysql_fetch_assocx2/#findComment-173382 Share on other sites More sharing options...
Asheeown Posted January 31, 2007 Author Share Posted January 31, 2007 Absolutely right on the dot...works perfect thanks much Link to comment https://forums.phpfreaks.com/topic/36436-solved-mysql_fetch_assocx2/#findComment-173383 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.