Re: [請益] PHP執行時出現warn錯誤

看板PHP作者 (3WA問題解決專家)時間16年前 (2009/11/25 21:18), 編輯推噓2(204)
留言6則, 4人參與, 最新討論串2/2 (看更多)
mysql> use test; Database changed mysql> create table table(id text); // 直接用 table 錯誤 ERROR 1064 (42000): 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 'table (id text)' at line 1 mysql> create table tables(id text); // 嘗試使用 tables Query OK, 0 rows affected (0.06 sec) mysql> create table `table`(id text); // 包起來就可以了 Query OK, 0 rows affected (0.03 sec) mysql> select * from table; // 直接用錯誤 ERROR 1064 (42000): 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 'table ' at line 1 mysql> select * from `table`; // 包起來就可以用了~ Empty set (0.03 sec) mysql> 保留字要多留意一下~ -- 3WA訓練家的工作室 宗旨:人生就是要爽 個人佈弱格 網址:http://3wa.tw -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.36.66.145

11/25 23:39, , 1F
真的是非常感謝你~~~~我把table名字換掉後就可以了~~
11/25 23:39, 1F

11/26 12:51, , 2F
table取名table…有一種爆笑片的感覺 絕命錯殺令裡的
11/26 12:51, 2F

11/26 12:52, , 3F
電腦 LOGIN: 'Login' PASSWORD: 'Password'
11/26 12:52, 3F

11/26 19:47, , 4F
11/26 19:47, 4F

11/27 16:37, , 5F
怎麼看來看去又看到這一回 XD
11/27 16:37, 5F

11/28 03:24, , 6F
????
11/28 03:24, 6F
文章代碼(AID): #1B3IwTmE (PHP)
文章代碼(AID): #1B3IwTmE (PHP)