2015-03-13 122 views
-4

我想寫一個查詢來刪除數據庫中的原始數據。這是查詢:SQL語法錯誤

"delete from ombrellone where PosizioneX='"+i+"'AND PosizioneY='"+j+"')"); 

我不知道我錯了什麼。任何人都可以幫助我?

唯一的例外是:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 
+2

我認爲錯誤是顯而易見的。 。 。你有一個閉幕式,但沒有開場白。將來,在變量替換後打印出你的SQL語句。也許你可以自己看到錯誤。 – 2015-03-13 18:19:46

回答

0
"delete from ombrellone where PosizioneX='" + i + "' AND PosizioneY = '" + j +"'";