Using DBD::Oracle, I consistently get $sth->rows returning 0 even when there's data for it. The reason that is, consulting the documentation, is that rows reliably returns the number of rows affected by a statement that *modifies* data, not on SELECT ones:
For `SELECT' statements, it is generally not possible to know how many rows will be returned except by fetching them all. Some drivers will return the number of rows the application has fetched so far, but others may return -1 until all rows have been fetched. So use of the `rows' method or `$DBI::rows' with `SELECT' statements is not recommended.You'll just have to count 'em manually, looks like.
HTH
Philosophy can be made out of anything. Or less -- Jerry A. Fodor
In reply to Re: small cgi output problem
by arturo
in thread small cgi output problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |