今天看yii 的书,里面有个mysql的DDL 语句始终跑不对,总是来这句
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 ''tbl_issue' ( 'id' INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, 'name' varchar(2' at line 1 mysql> CREATE TABLE 'tbl_issue' –>
书上是这句
后来上stackoverflow查了下,原来是排版的时候编辑把` 和’搞浑了
mysql里表名,字段名都可以用Backtick(`)括起来,而值是用单引号’ 扩起来的,
下次注意了