$dbh->do() is for very simple cases (like SELECT COUNT(*) FROM some_table). You don't have a simple case.
actually, $dbh->do() won't work for that either. from the documentation:
Returns the number of rows affected or "undef" on error. A return value of "-1" means the number of rows is not known, not applicable, or not available.
This method is typically most useful for non-"SELECT" statements that either cannot be prepared in advance (due to a limitation of the driver) or do not need to be executed repeatedly. It should not be used for "SELECT" statements because it does not return a statement handle (so you can't fetch any data).
In reply to Re: Re: Select Count(*) result
by thraxil
in thread Select Count(*) result
by SQLMan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |