The link just worked for me, but then again, CPAN has been a bit flaky lately.
That said, here is the wording from the relevant section:
The key to using do is that it can only return the number of row affected by an operation. This makes it ideal for INSERT, UPDATE and DELETE, but it simply can't do what you want when it comes to a SELECT statement.do $rows = $dbh->do($statement) or die $dbh->errstr; $rows = $dbh->do($statement, \%attr) or die $dbh->errstr; $rows = $dbh->do($statement, \%attr, @bind_values) or die ... Prepare and execute a single statement. Returns the number of rows aff +ected or undef on error. A return value of -1 means the number of row +s is not known, not applicable, or not available. This method is typically most useful for non-SELECT statements that ei +ther 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).
Sorry if the first post came across as a bit harsh, I should have put a smiley in there somewhere. Now that you beginning your endeavor to grok "DBI" you should probably a browser window open to the CPAN docs for it constantly. Hell, I still go back and check details on calls.
In reply to Re^3: Can not get the same output from $dbh->do and $dbh->prepare
by boftx
in thread Can not get the same output from $dbh->do and $dbh->prepare
by thanos1983
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |