note 21584 added to function.mysql-unbuffered-query
| From: | david@php.net | Date: | Sat, 18 May 2002 01:25:44 +0000 |
| Subject: | note 21584 added to function.mysql-unbuffered-query | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-30778@lists.php.net to get a copy of this message | ||
You are absolutely required to retrieve all rows in the result set (option 'a' in the
first comment). If you fail to do so, PHP will do so for you, and will emit a NOTICE warning you of
the fact. From the MySQL API, "Furthermore, you must retrieve all the rows even if you
determine in mid-retrieval that you've found the information you were looking for. ".
Also note that if you are using this function, you should be quick about processing the result set,
or you will tie up the MySQL server (other threads will be unable to write to the tables you are
reading from).
If you want to be able to 'abort' mid result-set or if you want to do lengthy processing
on the results, you are misunderstanding the purpose of this function.
Also the comment by max@phatmax.net is wrong. An UPDATE query will return no result set, the results
of mysql_use_result will be NULL.
--
http://www.php.net/manual/en/function.mysql-unbuffered-query.php
http://master.php.net/manage/user-notes.php?action=edit+21584
http://master.php.net/manage/user-notes.php?action=delete+21584
http://master.php.net/manage/user-notes.php?action=reject+21584