in reply to Return values from $dbh->do vs. $sth->execute();
The thing to realize is that an UPDATE or DELETE that affects 0 rows is not an error, as far as both DBI and MySQL are concerned. This is why you get the 0E0 return value instead of 0: the operation succeeded, but didn't affect any rows.
Having said all that, you should still be using placeholders for UPDATE/DELETE/INSERT statements. You can do that with do() if you want.
Michael
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: Return values from $dbh->do vs. $sth->execute();
by injunjoel (Priest) on Nov 24, 2003 at 23:46 UTC | |
by mpeppler (Vicar) on Nov 24, 2003 at 23:58 UTC |