For placeholders with do():
# Execute a delete from table foo where bar = "bars_value":
$dbh->do("delete from foo where bar = ?", undef, "bars_value");
For the return codes, the DBI spec says that do() and execute() should return the same thing - that is the number of rows affected by the operation, if that information is available, or -1 if the number of rows affected is unknown.
Now I don't know much about MySQL, or about DBD::mysql, so there may be something special going on here. You might want to check the DBD::mysql documentation directly.
Michael |