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 Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 31, 2007 Share Posted January 31, 2007 Why would you want to? Quote Link to comment 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 Quote Link to comment 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] Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.