It's intended to use MySQL unbuffered query when queries such as update delete are?

115 2

Multiple update/delete queries in discuz source use mysql_unbuffered_query, what's meant to be.
According to the manual ( ), the main difference between the mysql_query and the isn't to retrieve and cache the query results at once
But for update/delete queries, it returns the value of the as mysql_query, which doesn't seem to be necessary.

1 Answers

145 1

You're right, there's no need to use the mysql_unbuffered_query function in update/delete, and their differences are only on the processing of select.

mysql_query will automatically seek all the results in your select statement once in the client memory, and mysql_unbuffered_query will save only one current resource, and each time you. The two are the same for the update/delete because the write operation returns only successful state, without the need to cache result sets.