Scott Gifford wrote:
Ken Gieselman <[EMAIL PROTECTED]> writes:
[...]
So, here's my question: How can I find out how many rows are being
returned by a query, without using mysql_stmt_store_result() to
buffer all the rows back to the client?
One straightforward way is to replace the SELECT clause with just
SELECT COUNT(*) and execute that query first.
-----ScottG.
Yeah, that's my "fall-back" option -- though the thought of executing the query
twice is a bit daunting. Some of the tables run into billions of rows per year
(the merge tables anyhow, the data tables are broken down by month to keep them
from becoming totally unmanageable), and a multi-year search can take a while to
grind out.
Seems to me that by the time the first query execution is done, the server
should *know* exactly how many rows are in the result set -- just need to find
the magic trick that allows the client to query that number, rather than
counting for itself as it buffers them.
Thanks!
ken
--
===========================================================================
"Diplomacy is the weapon of the Civilized Warrior"
- Hun, A.T.
Ken Gieselman [EMAIL PROTECTED]
Endlessknot Communications http://www.endlessknot.com
===========================================================================
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]