note 14910 deleted from function.mysql-unbuffered-query by danbrown

From: Date: Wed, 03 Aug 2011 19:20:52 +0000
Subject: note 14910 deleted from function.mysql-unbuffered-query by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-182195@lists.php.net to get a copy of this message
Note Submitter: chabotc at reviewboard dot com ---- Stefan, unbuffered query sends a query to the server, and does not first download the results before sending them to the end-user (php in this case). So what it means is that -normaly- you could do this: $res1 = mysql_query("select some",$db_conn); while ($row = mysql_fetch_row($res)) { $res2 = mysql_query("select some other",$db_conn); // do some other stuff } With an unbuffered query you could NOT do this, the result set from $res1 would be LOST on the second query. However, it does not mean you -have- to fetch all rows ... just that the API does not save the result set in memory for you. However, when using different db connections, it all works ofcource ... For more information, please refer to the mysql manual, they have a lot of docs on query & unbuffered queries (the php api is just a basic wrapper around there native api's).

« previous php.notes (#182195) next »