isaac_cm Posted September 21, 2007 Share Posted September 21, 2007 hello, I need to loop over a record set and I need to know if the record set that returned by mysql_query whether if a separate record set from the physical table (cashed for example) or any updates in the table will be reflected immediately on this record set ? Thanks Quote Link to comment Share on other sites More sharing options...
teng84 Posted September 22, 2007 Share Posted September 22, 2007 not clear but i guess all you have to do is to get the time interval of each recodr to see how many has added or updated Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted September 23, 2007 Author Share Posted September 23, 2007 no, I mean does mysql_query return a complete cached or buffered record set of the table or not ? if it is not cashed all records then during a loop any insert, update or delete will be visible in this record set which I don't want because I making changes during the loop to the table Thanks Quote Link to comment Share on other sites More sharing options...
mezise Posted September 24, 2007 Share Posted September 24, 2007 Hi, mysql_query() automatically buffers whole selected record set. Unbuffered equivalent of this function is mysql_unbuffered_query(). If you would use mysqli interface be careful, because mysqli_query() has no mysqli_unbuffered_query() equivalent, instead you need to use mysqli_query(..., ..., MYSQLI_USE_RESULT) or mysqli_real_query() and mysqli_use_result(). Michal Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted September 24, 2007 Author Share Posted September 24, 2007 are you sure it buffer all the record set not just part of it ?, Thanks Quote Link to comment Share on other sites More sharing options...
mezise Posted September 24, 2007 Share Posted September 24, 2007 Yes, I'm sure. Michal Quote Link to comment Share on other sites More sharing options...
isaac_cm Posted September 24, 2007 Author Share Posted September 24, 2007 ok, thanks 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.