Thread Verzweigung bei leeren Tabellen (11 answers)
Opened by ottto at 2011-05-25 14:16

pq
 2011-05-25 15:06
#149159 #149159
User since
2003-08-04
12208 Artikel
Admin1
[Homepage]
user image
und was bringt das bei einem select-statement?

Quote
$rv = $sth->rows;

Returns the number of rows affected by the last row affecting command, or -1 if the number of
rows is not known or not available.

Generally, you can only rely on a row count after a non-"SELECT" "execute" (for some specific
operations like "UPDATE" and "DELETE"), or after fetching all the rows of a "SELECT" statement.

Last edited: 2011-05-25 15:10:31 +0200 (CEST)
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: Wiki:Wie frage ich & perlintro Wiki:brian's Leitfaden für jedes Perl-Problem

View full thread Verzweigung bei leeren Tabellen