Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Knowing if an Operation is Successful in MySql

by ehdonhon (Curate)
on Nov 14, 2003 at 12:59 UTC ( #307034=note: print w/ replies, xml ) Need Help??


in reply to Knowing if an Operation is Successful in MySql

This will tell you if your command ran successfully.

if ( $dbh->do( $command ) ) { &success; } else { &failure; }

This will tell you if you actually inserted anything:

if ( 0 + $dbh->do( $command ) ) { &success; } else { &failure; }


Comment on Re: Knowing if an Operation is Successful in MySql
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://307034]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (5)
As of 2014-12-27 01:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (176 votes), past polls