:(

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 state = 0 ) ORDER BY id desc LIMIT 5' at line 1 [ SQL语句 ] : SELECT `id`,`title`,`num` FROM `lqt_caigou` WHERE ( userid= and state = 0 ) ORDER BY id desc LIMIT 5

错误位置

FILE: /newdisk/wwwroot/lianqitong/ThinkPHP/Library/Think/Db/Driver.class.php  LINE: 350

TRACE

#0 /newdisk/wwwroot/lianqitong/ThinkPHP/Library/Think/Db/Driver.class.php(350): E('1064:You have a...')
#1 /newdisk/wwwroot/lianqitong/ThinkPHP/Library/Think/Db/Driver.class.php(180): Think\Db\Driver->error()
#2 /newdisk/wwwroot/lianqitong/ThinkPHP/Library/Think/Db/Driver.class.php(946): Think\Db\Driver->query('SELECT `id`,`ti...', false)
#3 /newdisk/wwwroot/lianqitong/ThinkPHP/Library/Think/Model.class.php(579): Think\Db\Driver->select(Array)
#4 /newdisk/wwwroot/lianqitong/Application/Home/Controller/CaigouController.class.php(140): Think\Model->select()
#5 [internal function]: Home\Controller\CaigouController->caigouinfo()
#6 /newdisk/wwwroot/lianqitong/ThinkPHP/Library/Think/App.class.php(173): ReflectionMethod->invoke(Object(Home\Controller\CaigouController))
#7 /newdisk/wwwroot/lianqitong/ThinkPHP/Library/Think/App.class.php(110): Think\App::invokeAction(Object(Home\Controller\CaigouController), 'caigouinfo')
#8 /newdisk/wwwroot/lianqitong/ThinkPHP/Library/Think/App.class.php(204): Think\App::exec()
#9 /newdisk/wwwroot/lianqitong/ThinkPHP/Library/Think/Think.class.php(120): Think\App::run()
#10 /newdisk/wwwroot/lianqitong/ThinkPHP/ThinkPHP.php(97): Think\Think::start()
#11 /newdisk/wwwroot/lianqitong/index.php(48): require('/newdisk/wwwroo...')
#12 {main}