RE: [PEAR] PEAR::DB and numRows()

From: Date: Fri, 18 Apr 2003 13:36:04 +0000
Subject: RE: [PEAR] PEAR::DB and numRows()
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-4946@lists.php.net to get a copy of this message
> From: dynamo@bellsouth.net [mailto:dynamo@bellsouth.net] > Sent: Thursday, April 17, 2003 9:11 PM > For some reason the numRows() function is behaving quite strangely. While > querying an oci8 database and then trying to report the number of rows it > will display 'Object' instead of the integer amount that was expected. > Also, everynow and then (it is completely random) I will get a Fatal Error > regarding the numRows function not existing. One would think that I have > mispelled the numRows function or some similar syntax error, however, when > I fresh the page it will usually continue normally. Please do a "print_r()" or "var_dump()" call on that object. I am pretty sure it's an error object. The function used to fetch rows on the oracle driver does not support numRows(). This is for performance reasons. In order for oracle to know how many rows are in the result set it would have to buffer the result set until is complete. If you still want to know how many rows are in the result set you can use getCol, getAll or getAssoc can simply count the number of "rows" in the resulting array. Regards, Lukas

« previous php.pear.general (#4946) next »