check the manual that corresponds to your MySQL server version for the right syntax to use near ****

今天在开发thinkphp的时候发现了这个问题,各个字段都是自动生成的,不知为何还是会报错

check the manual that corresponds to your MySQL server version for the right syntax to use near ****
$res = Db::query("show create table ".$val);

check the manual that corresponds to your MySQL server version for the right syntax to use near 'order' at line 1

一般情况下是语法问题,二般就是关键字问题,问题一般都在引号里面字段的附近

而我碰到的是三般 我的表名叫"order" 而order是mysql中内置的关键字 ,当成表名后被误以为要排序 …???? 把表明改成order1后就结束了