:(

1064: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 'AND a.id1007 AND a.status=1 Order by a.level desc, a.id desc' at line 1 [ SQL语句 ] : SELECT a.id, a.title, a.category_id, b.path, 'chunridang' as typename FROM ib_document AS a LEFT JOIN ib_picture AS b ON a.cover_id=b.id WHERE a.category_id= AND a.id1007 AND a.status=1 Order by a.level desc, a.id desc

错误位置

FILE: /mnt/dicos.com.cn/ThinkPHP/Library/Think/Db/Driver.class.php  LINE: 385

TRACE

#0 /mnt/dicos.com.cn/ThinkPHP/Library/Think/Db/Driver.class.php(385): E('1064:You have a...')
#1 /mnt/dicos.com.cn/ThinkPHP/Library/Think/Db/Driver.class.php(196): Think\Db\Driver->error()
#2 /mnt/dicos.com.cn/ThinkPHP/Library/Think/Model.class.php(1544): Think\Db\Driver->query('SELECT a.id, a....')
#3 /mnt/dicos.com.cn/Application/Home/Controller/FreshController.class.php(90): Think\Model->query('SELECT a.id, a....')
#4 [internal function]: Home\Controller\FreshController->detail('chunridang', '1007')
#5 /mnt/dicos.com.cn/ThinkPHP/Library/Think/App.class.php(176): ReflectionMethod->invokeArgs(Object(Home\Controller\FreshController), Array)
#6 /mnt/dicos.com.cn/ThinkPHP/Library/Think/App.class.php(113): Think\App::invokeAction(Object(Home\Controller\FreshController), 'detail')
#7 /mnt/dicos.com.cn/ThinkPHP/Library/Think/App.class.php(213): Think\App::exec()
#8 /mnt/dicos.com.cn/ThinkPHP/Library/Think/Think.class.php(135): Think\App::run()
#9 /mnt/dicos.com.cn/ThinkPHP/ThinkPHP.php(90): Think\Think::start()
#10 /mnt/dicos.com.cn/index.php(55): require('/mnt/dicos.com....')
#11 {main}