Re:[PHP-DB] ORACLE Stored procedure trouble

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

 




The code for interogating an Oracle database may be done or by oci_functions or ora_functions.
Exemple:

$conn = ocilogon ('username','password');
$query1 = "select field1, field2 from table1 where field3='2'";
$statement = ociparse($conn, $query1);
ociexecute($statement);
while (ocifetchinto($statement, $result)) //result[0]-->field1, result[1]-->field2
{
	$var1[] = $r1[0];
	$var[] = $r1[1];
	$counter++;
}
ocifreestatement($statement);

--------------------
and ora functions:
$r = ora_logon ('username','password');
$cursor1 = ora_open($r);
$query1 = "select field1,field2 from table1 where field3='".$value."'";
$i11 = ora_parse($cursor1, $query1, $defer);
	$i12 = ora_exec($cursor1);
	$i13 = ora_fetch($cursor1);
while ($i13 != false)
	{
	$value1 = ora_getcolumn($cursor1, 0);
      $value2 = ora_getcolumn($cursor1, 1);
	$i13 = ora_fetch($cursor1);
      }


xde7ori
Free Email Account at www.flash.ro


-- 
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