我試圖使一個MySQL插入這樣一個在這裏MySQL的INSERT查詢語法錯誤
<http://www.w3schools.com/php/php_mysql_insert.asp >
INSERT INTO table_name (column1, column2, column3,...) VALUES (value1, value2, value3,...)
我想下面的值插入到表的用戶羣。
54007033331, Codi Y, Male, pub, http://google.com/ggg.jpg
INSERT INTO userbase (id,name,gender,publicity,pic) VALUES (54007033331, Codi Y, Male, pub, http://google.com/ggg.jpg)
MySQL query failed: 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 'Y, Male, pub, http://google.com/ggg.jpg)' at line 1
任何人都可以請指出我正確的方向如何解決這個語法錯誤?
老兄,字符串需要在mysql(和大多數其他語言)中引用。 – aroth 2012-02-15 00:14:41