Re: [請益] PHP執行時出現warn錯誤
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
11/25 23:39, 1F
→
11/26 12:51, , 2F
11/26 12:51, 2F
→
11/26 12:52, , 3F
11/26 12:52, 3F
推
11/26 19:47, , 4F
11/26 19:47, 4F
→
11/27 16:37, , 5F
11/27 16:37, 5F
→
11/28 03:24, , 6F
11/28 03:24, 6F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章
0
18