Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- MySQL result to point to the beginning
- Matthias Braun
April 22, 2010, 6:26 pm
rate this thread
I have an unbuffered query mysql-result as follows:
$result = mysql_unbuffered_query($sqlstring, $db_connection);
Now, I am accessing the result:
while ($row = mysql_fetch_row($result))
How can I put the pointer of the result back to the start? I tried it with
but this does not work. Who can help?
Re: MySQL result to point to the beginning
I suspect that the reason why mysql_data_seek($result,0) doesn't work
may have something to do with the fact that the manual specifically
says it does not work with mysql_unbuffered_query().
Indeed, if you bother to think about it for just a moment, you will
realise that, since the result is not buffered, there is no "start" to
go back to!
Or did you think that unbuffered meant something else?
The only way to restart it is to re-issue the query.
- » OT - Anyone tried parsing a very large XML file on IIS?
- — Next thread in » PHP Scripting Forum