Hi, I have been trying to get some data into my database but it just isn't happening. My script and the errors are below.
Any help would be most appreciated.
Thanks
Katie
<?php
putenv("ORACLE_HOME=/usr/local/oracle/product/8.1.7");
putenv("ORACLE_SID=Lev3");
putenv("ORACLE_BASE=/usr/local/oracle");
$conn=OCILogon("it2001_hendryk","salehj1","it");
$hospNo = "1";
$paediatrician ="Dr Wilson";
$nurse ="Miss Jones";
//2)Build the insert statement
$addPatient = " INSERT INTO patient (hospNo, paediatrician, nurse)
VALUES (:hospNo, :paediatrician, :nurse)";
$iStatement =OCIParse($conn,addPatient);
OCIBindByName($iStatement ,":hospNo", &$hospNo, 7);
OCIBindByName($iStatement,":paediatrician",&$paediatrician,30);
OCIBindByName($iStatement,":nurse", &$nurse,30);
OCIExecute($iStatement,OCI_DEFAULT);
OCICommit($conn);
OCILogoff($conn);
?>
Warning: OCIBindByName: ORA-01036: illegal variable name/number in /export/local/www.proj/html/students/MScIT/hendryk/test.php on line 29
Warning: OCIBindByName: ORA-01036: illegal variable name/number in /export/local/www.proj/html/students/MScIT/hendryk/test.php on line 30
Warning: OCIBindByName: ORA-01036: illegal variable name/number in /export/local/www.proj/html/students/MScIT/hendryk/test.php on line 31
Warning: OCIStmtExecute: ORA-00900: invalid SQL statement in /export/local/www.proj/html/students/MScIT/hendryk/test.php on line 38