I believe OICrowcount() only returns the number of affected DML affected
rows, ones affected by insert or update.
Use two seperate queries, one for the count, then another for the data.
"SELECT COUNT(*) FROM yourTable WHERE yourWhereClause"
Or read all the records into an array and count 'em as you read 'em. <-
this could be very memory consuming.
""Mark"" <[EMAIL PROTECTED]> wrote in message
995b4h$jfv$[EMAIL PROTECTED]">news:995b4h$jfv$[EMAIL PROTECTED]...
> 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> <!--spacer
> cell --> </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
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]