2013-02-15 71 views
0
INSERT INTO PHOENIX_AUDITTRAIL SET 
audit_module = 'Location Master', 
audit_message = 'Delete location', 
datecreated = NOW(), 
author = '".$_SESSION['username']."', 
status = '".ADT_NOTICE."'; 

回答

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語法。

+0

好的tq ..但我已經使用'insert語句'通過使用PHP和MySQL,它的工作完美。我在oracle中是新的,感謝那些信息 – 2013-02-15 01:17:47