Hi,
 Can anyone help me to understand the OCIBindByName/OCIDefineByName
functionality when used with the Oracle 'returning' clause? These two
functions are seriously under-documented at PHP.net.
 I need the sequence-generated ID created during an insert for further
manipulation.
 I tried sequence-name.currval but got an error.
 Here's some code that doesn't work:

   $sql = "insert into mdfaq values (null,'$Question','$Answer') returning
ID into :ID";
   $stmt = ociParse($conn,$sql);
   OCIBindByName($stmt,":ID",&$faq_ID,-1);
   ociExecute($stmt);

   $sql = "insert into mdfaq_faq_cat values ($faq_ID, $req_cat)";
   $stmt = ociParse($conn,$sql);
   ociExecute($stmt);

 Any Ideas?
 Thx in Advance,
 Barry Prentiss



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

Reply via email to