On Tue, 26 Jun 2001, Sterin, Ilya wrote:
> Why? You can prepare and execute with do() for update and insert
> statements.
What about SELECT statements, though? The selectrow_array functions aren't
adequate for this, because they can only be used to return the first row.
> $sth->rows does not guarantee and in most casese will not return the number
> of rows that the select statement returns. In most cases it will return the
> rows fetched so far, or depending on the db driver the rows fetched in the
> cache. You should either use "select count(*) from ..." query to get the
> number of rows or use a counter.
I heard about this before, but it does not seem to be true for MySQL; I've
never had trouble using $sth->rows under MySQL.
-Philip Mak ([EMAIL PROTECTED])