At 3:28 PM +0900 6/17/01, Batara Kesuma wrote:
>Hi all,
>
>I read in DuBois's MySQL, Perl DBI API Reference part, it is written:
>$rv = $sth->rows();
>Return the number of rows affected by the statement associated with $sth
>or -1 if an error occured. This method is used primarily for statements
>that do not return rows. For SELECT statements, you should not rely on the
>rows() method; count the rows as you fetch them instead.
>
>My question is, why we should not rely on $sth->rows()? Does it mean that
>it doesn't match sometime? Anybody ever experienced?

It's not guaranteed to work.  It's not portable.
In practice, it seems to work fine for MySQL. The warning is there
so that you can't blame DBI if you rely on rows() and one day find that
it fails. :-)

>
>Also, in the case of "ERROR 1114: The table 'SQL22e0b00_0' is full". I
>found that this function returned -2 instead of -1.
>
>--bk


-- 
Paul DuBois, [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to