PHP / OCI Invalid Character during insert

1.2k views Asked by At

I am trying to do an Oracle insert statement on a PHP page but I am getting the error below. If I remove the semicolon from the statement, the page never loads (even though the insert on the backend should take a fraction of a second). Any tips would be greatly appreciated!

$sql_update = "
update schema.table set last_check_dt = (select sysdate from dual)
where id = (select id from schema.email where current_email = '" . $email . "');";

$stid = oci_parse($conn, $sql_update);
oci_execute($stid); 
oci_commit($conn);
oci_close($conn);

Warning: oci_execute() [function.oci-execute]: ORA-00911: invalid character 
1

There are 1 answers

3
Maheswaran Ravisankar On BEST ANSWER
$sql_update = "
update schema.table set last_check_dt = (select sysdate from dual)
where id = (select id from schema.email where current_email = '" . $email . "')";

Your SQL, when run through a OCI.. Don't need a semicolon as terminator.