SQL_CALC_FOUND_ROWS using ODBC driver
am 15.02.2007 02:04:26 von Nuno Oliveira
Hi,
I've used PHP with MySQL and I was able to count the rows of a table by
using the following code:
SELECT SQL_CALC_FOUND_ROWS * FROM MyTableName;
SELECT FOUND_ROWS();
However, I would like to do the same thing using Visual Basic 6...
When I set the RS.Source to the first SELECT statement and open it, it
run OK but I need to close the RS and open it again using the second
SELECT statement.
After any of this operations I get a Recordset->RecordsCount = 1
How can I work this out?
Thanks
--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org
RE: SQL_CALC_FOUND_ROWS using ODBC driver
am 19.02.2007 22:19:33 von John.Bonnett
Why not just=20
SELECT COUNT(*) FROM MyTableName;=20
and the result will be in rs.Fields(0).Value?
John Bonnett
-----Original Message-----
From: Nuno Oliveira [mailto:dreasi0n.mysql.com@gmail.com]=20
Sent: Thursday, 15 February 2007 11:34 AM
To: myodbc@lists.mysql.com; mysql@lists.mysql.com
Subject: SQL_CALC_FOUND_ROWS using ODBC driver
Hi,
I've used PHP with MySQL and I was able to count the rows of a table by
using the following code:
SELECT SQL_CALC_FOUND_ROWS * FROM MyTableName; SELECT FOUND_ROWS();
However, I would like to do the same thing using Visual Basic 6...
When I set the RS.Source to the first SELECT statement and open it, it
run OK but I need to close the RS and open it again using the second
SELECT statement.
After any of this operations I get a Recordset->RecordsCount =3D 1
How can I work this out?
Thanks
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dgcdmg-mysql@m.gmane.org