INSERT INTO PHOENIX_AUDITTRAIL SET
audit_module = 'Location Master',
audit_message = 'Delete location',
datecreated = NOW(),
author = '".$_SESSION['username']."',
status = '".ADT_NOTICE."';
答案 0 :(得分:1)
不,这句话的标准方法是:
INSERT INTO PHOENIX_AUDITTRAIL(audit_module, audit_message, datecreated, author, status)
select 'Location Master', 'Delete location', NOW(), '".$_SESSION['username']."', '".ADT_NOTICE."'
from dual
但是,在Oracle中,我认为您将使用sysdate
而不是now()
:
INSERT INTO PHOENIX_AUDITTRAIL(audit_module, audit_message, datecreated, author, status)
select 'Location Master', 'Delete location', sysdate, '".$_SESSION['username']."', '".ADT_NOTICE."'
from dual
除日期变量和from dual
外,这是标准的SQL语法。