note 18041 added to ref.oci8
| From: | edahnke at consultant dot com | Date: | Tue, 08 Jan 2002 17:01:38 +0000 |
| Subject: | note 18041 added to ref.oci8 | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-24536@lists.php.net to get a copy of this message | ||
Here's a little snipet that shows how to insert multiple clob fields. Worked for me.
$dbh = OCILogon($dst_user_name, $dst_password, $dst_db_name);
for($i = 0; $i < $src_rec_cnt; $i++) {
$query = "insert into bid (id,time,resume,experience,comments) values
('$id[$i]','$time[$i]',empty_clob(),empty_clob(),empty_clob()) returning
resume,experience,comments into :resume,:experience,:comments";
$stmt = OCIParse($dbh, $query);
$clob1 = OCINewDescriptor($dbh, OCI_D_LOB);
$clob2 = OCINewDescriptor($dbh, OCI_D_LOB);
$clob3 = OCINewDescriptor($dbh, OCI_D_LOB);
OCIBindByName ($stmt, ":resume", &$clob1, -1, OCI_B_CLOB);
OCIBindByName ($stmt, ":experience", &$clob2, -1, OCI_B_CLOB);
OCIBindByName ($stmt, ":comments", &$clob3, -1, OCI_B_CLOB);
OCIExecute($stmt, OCI_DEFAULT);
@$clob1->save ($resume[$i]);
@$clob2->save ($experience[$i]);
@$clob3->save ($comments[$i]);
OCICommit($dbh);
--
http://www.php.net/manual/en/ref.oci8.php
http://master.php.net/manage/user-notes.php?action=edit+18041
http://master.php.net/manage/user-notes.php?action=delete+18041
http://master.php.net/manage/user-notes.php?action=reject+18041