note 14910 added to function.mysql-unbuffered-query.php

From: Date: Tue, 21 Aug 2001 06:21:07 +0000
Subject: note 14910 added to function.mysql-unbuffered-query.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-16943@lists.php.net to get a copy of this message
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). http://www.php.net/manual/en/function.mysql-unbuffered-query.php

« previous php.notes (#16943) next »