Re: MySQL ResultSet - count rows?
- From: Sabine Dinis Blochberger <no.spam@xxxxxxxxxxxx>
- Date: Mon, 10 Dec 2007 09:45:04 GMT
Christoph wrote:
Hello,There is a SQL statement to the effect: select count(*) from tablename
I am writing the data of a ResultSet object to an array. To declare
the array length, I need to know the number of rows before copying
them - is there a way to read the row count instantly, without having
to iterate anything?
PHP has mysql_count_rows, but I'm not sure what that does internally -
it may just iterate over the data too.
Look it up to see if it can be optimized.
--
Sabine Dinis Blochberger
Op3racional
www.op3racional.eu
.
- Follow-Ups:
- Re: MySQL ResultSet - count rows?
- From: Christoph
- Re: MySQL ResultSet - count rows?
- References:
- MySQL ResultSet - count rows?
- From: Christoph
- MySQL ResultSet - count rows?
- Prev by Date: Re: MySQL ResultSet - count rows?
- Next by Date: Re: MySQL ResultSet - count rows?
- Previous by thread: Re: MySQL ResultSet - count rows?
- Next by thread: Re: MySQL ResultSet - count rows?
- Index(es):
Relevant Pages
|