problem with num_rows (OCIRowCount)

From: Date: Mon, 19 Mar 2001 16:15:34 +0000
Subject: problem with num_rows (OCIRowCount)
Groups: php.db 
Request: Send a blank email to php-db+get-7603@lists.php.net to get a copy of this message
Using phplib ---- db_oci8.inc This function ( a method of Db_Sql class) is giving me problems. I've read in one place that it cannot be used for SELECT statements but in another place that it can. function num_rows() { return OCIrowcount($this->Parse); } Then in my code that uses it, I have if($result->num_rows() < 1) { echo '<table width="100" border=0><tr><td>&nbsp;<!--spacer cell -->&nbsp;</td></tr>'; echo '<tr><td><div class="errorMsg">No results returned</div></td></tr></table>' return false; } This always returns 0, every time. I don't know why? How can I get around this. I need it to actually return the number of rows, or at least let me check to see that there were rows returned from the query. -Mark

« previous php.db (#7603) next »