Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
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; }

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
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 chanting in the Monastery: (2)
As of 2023-03-29 01:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (70 votes). Check out past polls.

    Notices?