2014-09-11 121 views
0

我得到這個錯誤:通過PHP將數據插入Progress db?

Warning: odbc_exec(): SQL error: [unixODBC][DataDirect][ODBC 20101 driver][20101]Syntax error in SQL statement at or about "'BatchStatus','BatchRecepient','" (10713), SQL state 60

我用下面的代碼中插入數據到數據庫的進展:

INSERT INTO PUB.WebReportBatch ('BatchStatus','BatchRecepient','OrderNumber','BatchPartner') 
VALUES ('Pending','[email protected]','00003660','') 

回答

1

'BatchStatus', 'BatchRecepient', '訂單號碼', 'BatchPartner'是值。您可能想要將此語句更改爲如下所示:

insert into PUB.WebReportBatch(BatchStatus,BatchRecepient,OrderNumber,BatchPartner)values('Pending','[email protected]','00003660','' )

+0

謝謝你現在很有效 – user3715001 2014-09-11 11:28:00

1

注意:在插入查詢中寫入列名時請勿使用單引號。所以查詢將是 -

INSERT INTO PUB.WebReportBatch (BatchStatus,BatchRecepient,OrderNumber,BatchPartner) VALUES ('Pending','[email protected]','00003660','')