Re: PHP 4.3.4 ADODB Oracle 9.2

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





William Cheung wrote:

All the system errors are solved. However, the query seems not returning any rows. I got undefined index error on any query returns.

Am I hitting the brick wall? Do PHP and ADODB work with Oracle 9.2? Are there anyone know the answer?

I am using Windows 2K, IIS and Oracle.

The script below works for me with W2K, Apache 1.3, PHP 4.3.3 (and 4.3.5RC1) and ADOdb 4.10.

Chris

-----


<?php


require_once("adodb.inc.php");

define("ORA_CON_UN", "hr");
define("ORA_CON_PW", "hr");
define("ORA_CON_DB", "");

function error($w, $m)
{
  echo "$w: $m";
  die;
}

$db = ADONewConnection("oci8");
if (!@$db->Connect(false, ORA_CON_UN, ORA_CON_PW, ORA_CON_DB))
   error('Error connecting', $db->ErrorMsg());

if (!$rs = $db->Execute("SELECT * FROM DUAL"))
  error('Error selecting', $db->ErrorMsg());

$row = $rs->FetchRow();
echo "<pre>"; var_dump($row); echo "</pre>";

?>

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux