OCIStmtExecute: ORA-01008: not all variables bound on Anonymous PL/SQL
| From: | Prince | Date: | Wed, 07 Aug 2002 18:14:25 +0000 |
| Subject: | OCIStmtExecute: ORA-01008: not all variables bound on Anonymous PL/SQL | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-21051@lists.php.net to get a copy of this message | ||
I have the sample php program. While trying to execute, I get the above
mentioned error.
SQL> create type typ_numbertab TABLE OF number(12);
% cat mytest.php
-----------------------------Program Begins--------------------------------
#!/usr/local/php4/bin/php -q
<?
$dept = array(10,20,30,40);
$db = OCILogon("scott","tiger");
$arr = OCINewCollection($db,'TYP_NUMBERTAB');
$sqlstmt =
"
-- declare
-- :dept TYP_VARCHARTAB ;
begin
forall i in 1..:dept.count
insert into t values (:dept(i));
end;";
$stmt = OCIParse($db,$sqlstmt);
while (list(,$v) = each($dept)) {
$arr->append($v);
}
$bnd = OCIBindByName($stmt,':dept',$arr,32,OCI_B_SQLT_NTY);
OCIExecute($stmt);
?>
-----------------------------Program Ends----------------------------------
% mytest.php
<br />
<b>Warning</b>: OCIStmtExecute: ORA-01008: not all variables bound
in <b>mytest.php</b> on line <b>25</b><br />
Can someone tell me what is it complaining about and how to fix this?
Thanks,