numRows + oci8
| From: | Ignat Ikryanov | Date: | Tue, 02 Apr 2002 08:17:35 +0000 |
| Subject: | numRows + oci8 | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-1073@lists.php.net to get a copy of this message | ||
Hello!
I have a problem when I try use numRows() function with oci8 driver (PHP
4.1.2, Oracle 8.1.7, Apache 1.3.20).
<?php
...........
$dns = sprintf("oci8://$oracle_user:$oracle_password@$oracle_db_name");
$db=DB::connect($dns,true);
if(DB::isError($db))die ($db->getMessage());
$query="SELECT * FROM (SELECT rownum rnum,t1.* from (SELECT id,head FROM t2)
t1) WHERE rnum<10";
$result=$db->query($query);
if(DB::isError($result))die ($result->getMessage());
$rnum=$result->numRows();
if(DB::isError($rnum))die ($rnum->getMessage());
// Error is generated in this line ^^^^^^^^^^^^^^
echo $rnum;
?>
I always receive the error message: "DB Error: DB backend not capable."
What is wrong?