1 頁 (共 1 頁)

[問題]虛擬精靈的SQL問題

發表於 : 2003-08-21 17:14
5mb
●架設主機作業系統:Windows Xp Home
●快速架站程式:Appserv1.90
●您的上網方式:ADSL
●您的 phpBB2 版本:phpBB Plus 1.1
●錯誤狀態:
我在匯此段(最長這段)入SQL中發生問題:

[php]
INSERT INTO week9_data (id, sort, sp_name, sp_money, sp_description, sp_wear, sp_fitherd, sp_graphic, sp_sxgraphic, sp_suit, sp_suitgraphic, sp_number) VALUES (1, '10', '金質項鏈', 5, '金質項鏈', '300', 't', '1.gif', '1x.gif', '', '', 5),
(2, '10', '兒童圍巾', 1, '兒童圍巾', '200', 't', '2.gif', '2x.gif', '', '', 5),
(3, '10', '素色圍巾', 1, '素色圍巾', '300', 't', '3.gif', '3x.gif', '', '', 5),
(4, '10', '溫暖牌圍巾', 1, '溫暖牌圍巾', '300', 't', '4.gif', '4x.gif', '', '', 5),
.
中間略\r
.
(1135, '3', '棕熊玩具', 30, '棕熊玩具', '300', 't', '13.gif', '13x.gif', '', '', 4);
[/php]
如果一次全部匯進去的話出現:

代碼: 選擇全部

這可能是您找到了 SQL 分析程式的一些程式錯誤,請細心查看您的語法,檢查一下引號是正確及沒有遺漏,其他可能出錯的原因可能來自您上載檔案時在引號外的地方使用了二進制碼。您可以嘗試在 MySQL 命令列介面執行該語法。如 MySQL 伺服器發出錯誤信息,這可能幫助您去找出問題所在。如您仍然未能解決問題,或在分析程式出現錯誤,但在命令列模式能正常執行,請將該句出現錯誤的 SQL 語法抽出,並將以下的"剪取"部份一同提交到臭虫區:

錯誤
MySQL 傳回: 
Query was empty
我試著匯第一句:
[php]
INSERT INTO week9_data (id, sort, sp_name, sp_money, sp_description, sp_wear, sp_fitherd, sp_graphic, sp_sxgraphic, sp_suit, sp_suitgraphic, sp_number) VALUES (1, '10', '金質項鏈', 5, '金質項鏈', '300', 't', '1.gif', '1x.gif', '', '', 5),
[/php]

則出現:

代碼: 選擇全部

錯誤

SQL 語法 :  

INSERT INTO week9_data( id, sort, sp_name, sp_money, sp_description, sp_wear, sp_fitherd, sp_graphic, sp_sxgraphic, sp_suit, sp_suitgraphic, sp_number ) 
VALUES ( 1, '10', '金質項鏈', 5, '金質項鏈', '300', 't', '1.gif', '1x.gif', '', '', 5 ) , 

MySQL 傳回: 

You have an error in your SQL syntax near '' at line 1
怎模會這樣..... :cry:

Re: [問題]虛擬精靈的SQL問題

發表於 : 2003-08-21 17:22
H.T.Demon
5mb 寫: 我試著匯第一句:
則出現:

代碼: 選擇全部

MySQL 傳回: 
You have an error in your SQL syntax near '' at line 1
這是因為你之前已經匯入過一次第一句 所以不能重複匯入

Re: [問題]虛擬精靈的SQL問題

發表於 : 2003-08-21 19:14
5mb
H.T.Demon 寫:
5mb 寫: 我試著匯第一句:
則出現:

代碼: 選擇全部

MySQL 傳回: 
You have an error in your SQL syntax near '' at line 1
這是因為你之前已經匯入過一次第一句 所以不能重複匯入
可是裡面是空的耶..... :cry:

Re: [問題]虛擬精靈的SQL問題

發表於 : 2003-08-21 19:36
H.T.Demon
5mb 寫:可是裡面是空的耶..... :cry:
試試看.... 先關閉執行MySQL 然後再重新執行 然後再匯入SQL :-|

Re: [問題]虛擬精靈的SQL問題

發表於 : 2003-08-21 20:16
yll
5mb 寫: 我試著匯第一句:
[php]
INSERT INTO week9_data (id, sort, sp_name, sp_money, sp_description, sp_wear, sp_fitherd, sp_graphic, sp_sxgraphic, sp_suit, sp_suitgraphic, sp_number) VALUES (1, '10', '金質項鏈', 5, '金質項鏈', '300', 't', '1.gif', '1x.gif', '', '', 5),
[/php]

則出現:

代碼: 選擇全部

錯誤

SQL 語法 :  

INSERT INTO week9_data( id, sort, sp_name, sp_money, sp_description, sp_wear, sp_fitherd, sp_graphic, sp_sxgraphic, sp_suit, sp_suitgraphic, sp_number ) 
VALUES ( 1, '10', '金質項鏈', 5, '金質項鏈', '300', 't', '1.gif', '1x.gif', '', '', 5 ) , 

MySQL 傳回: 

You have an error in your SQL syntax near '' at line 1
怎模會這樣..... :cry:
最後要是分號;

INSERT INTO week9_data( id, sort, sp_name, sp_money, sp_description, sp_wear, sp_fitherd, sp_graphic, sp_sxgraphic, sp_suit, sp_suitgraphic, sp_number )
VALUES ( 1, '10', '金質項鏈', 5, '金質項鏈', '300', 't', '1.gif', '1x.gif', '', '', 5 ) ;



全文好像中間有個地方\r
中文有問題
改一下...

Re: [問題]虛擬精靈的SQL問題

發表於 : 2003-08-21 22:35
5mb
yll 寫: 全文好像中間有個地方\r
中文有問題
改一下...
嗯....多謝幫忙....我找了很久是這其中3個在做怪.... :lol:
(307, '2', '烏姆輕絢?, 18, '烏姆輕絢?, '400', 't', '37.gif', '37x.gif', '', '', 5),
(326, '14', '略藽嚆?, 2, '略藽嚆?, '300', 'f', 'f3.gif', 'f3x.gif', '', '', 5),
(1120, '4', '嶽?, 30, '嶽?, '300', 't', '4.gif', '4x.gif', '', '', 4),

妳們灌ㄉ時候都ok嗎?怎模只有我有這種問題阿?? :-(

發表於 : 2003-08-21 22:44
yll

我習慣都會檢查一遍 8-)