SQLSTATE[42000]: Syntax error or access violation: 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 ') ORDER BY field(n.id,)' at line 1

错误位置

FILE: /data/www/app-php/ThinkPHP/Library/Think/Db/Driver.class.php  LINE: 169

TRACE

#0 /data/www/app-php/ThinkPHP/Library/Think/Db/Driver.class.php(169): PDOStatement->execute()
#1 /data/www/app-php/ThinkPHP/Library/Think/Db/Driver.class.php(930): Think\Db\Driver->query('SELECT n.*,t.ty...', false)
#2 /data/www/app-php/ThinkPHP/Library/Think/Model.class.php(579): Think\Db\Driver->select(Array)
#3 /data/www/app-php/Application/Api/Controller/NewsController.class.php(147): Think\Model->select()
#4 /data/www/app-php/Application/Common/Singleflight.class.php(35): Api\Controller\NewsController->Api\Controller\{closure}()
#5 /data/www/app-php/Application/Common/Singleflight.class.php(24): Common\Singleflight->doReq(Object(Closure))
#6 /data/www/app-php/Application/Common/Common/function.php(1082): Common\Singleflight->get('6b695c608b693e7...', Object(Closure), 60, 60)
#7 /data/www/app-php/Application/Api/Controller/NewsController.class.php(167): LC('f701b30c508b0bf...', Object(Closure))
#8 [internal function]: Api\Controller\NewsController->index()
#9 /data/www/app-php/ThinkPHP/Library/Think/App.class.php(164): ReflectionMethod->invoke(Object(Api\Controller\NewsController))
#10 /data/www/app-php/ThinkPHP/Library/Think/App.class.php(202): Think\App::exec()
#11 /data/www/app-php/ThinkPHP/Library/Think/Think.class.php(120): Think\App::run()
#12 /data/www/app-php/ThinkPHP/ThinkPHP.php(116): Think\Think::start()
#13 /data/www/app-php/index.php(24): require('/data/www/app-p...')
#14 {main}