插入期间PHP / OCI字符无效

时间:2014-11-25 22:30:01

标签: php oracle oci

我正在尝试在PHP页面上执行Oracle插入语句,但我收到以下错误。如果我从语句中删除分号,页面永远不会加载(即使后端的插入应该只需要几分之一秒)。任何提示将不胜感激!

$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 个答案:

答案 0 :(得分:2)

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

您的SQL,通过OCI运行时..不需要semicolon作为终止符。