Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: DBI::rows

by Centaurus (Novice)
on Jun 29, 2001 at 01:08 UTC ( #92470=note: print w/replies, xml ) Need Help??


in reply to DBI::rows

I believe the $sth->execute method returns the number of rows or -1 if no rows affected.
You may also want to try the $sth->rows method.

Replies are listed 'Best First'.
Re: Re: DBI::rows
by Maestro_007 (Hermit) on Jun 29, 2001 at 01:34 UTC
    In the leopard book (O'Reilly's DBI book), p. 223, it says that $sth->execute() only returns the number of rows affected by non-SELECT statements. In SELECT statements it "simply returns a true value".

    MM

Re: DBI::rows (boo)
by boo_radley (Parson) on Jun 29, 2001 at 17:01 UTC
    Centaurus writes :
    I believe the $sth->execute method returns the number of rows or -1 if no rows affected. You may also want to try the $sth->rows method.
    These methods are unreliable in some databases -- they may only return an accurate count if all the rows have been read.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (5)
As of 2023-06-01 12:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?