我正在尝试在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
答案 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
作为终止符。