Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Checking return results from an execute

by aersoy (Scribe)
on Jun 28, 2002 at 21:45 UTC ( [id://178160]=note: print w/replies, xml ) Need Help??


in reply to Checking return results from an execute

Hello,

It is highly dependant on the database backend you use, but I guess

my $sth = $dbh->prepare("SELECT * FROM foo"); $sth->execute(); my $num_rows = $sth->rows;

is what you are looking for. I know it works with MySQL at least. You should check the man page of your database driver (ie. DBD::mysql) to learn more about it.

--
Alper Ersoy

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-04-25 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found