Forum Moderators: coopster
Hey all, I came across a reference to this function somewhere today, and gave it a shot. I tried it out by simply replacing mysql_query in a simple little while loop:
$result = mysql_unbuffered_query($querydata);
while ($row = mysql_fetch_array($result)) { //Do Something
}
It gave me the following error:
Notice: mysql_query(): Function called without first fetching
all rows from a previous unbuffered query
There is a second query that immediately follows the aforementioned, and that seems to be what is throwing the error.
Now, using the unbuffered query is supposed to be a bit quicker for large data sets - cool. But how do you avoid what happened to me above?
Thanks coopster.
Okay, so, here goes...
If you feel you need to use this function, by all means do so, just be careful and know what you are doing as you could tie up your processor.
There is good advice in the PHP User Contributed notes from David dated May 17, 2002.