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 | [reply] [d/l] |
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. | [reply] |