Re:ORACLE Stored procedure trouble

From: Date: Tue, 22 Oct 2002 13:16:19 +0000
Subject: Re:ORACLE Stored procedure trouble
Groups: php.db 
Request: Send a blank email to php-db+get-22573@lists.php.net to get a copy of this message
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

« previous php.db (#22573) next »