mysql_unbuffered_query(query[,link_identifier][,result_mode])

Description: Sends a query to the currently selected MySQL database on the MySQL server specified by link_identifier, without fetching and buffering the resultset rows automatically. If link_identifier is not specified, the last opened database connection is used.

result_mode may optionally be specified, as either MYSQL_USE_RESULT or MYSQL_STORE_RESULT. Unspecified (the most commonly used form), it defaults to MYSQL_USE_RESULT, which does not buffer the result on the client. This default behavior is the opposite of mysql_query().

By not buffering on the client, memory is saved. However, you have to fetch all result rows before a second query can be issued, and you cannot use functions ...

Get Sams Teach Yourself MySQL in 21 Days, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.