:(

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 id asc LIMIT 1' at line 1 [ SQL语句 ] : SELECT `id`,`title` FROM `hd_news` WHERE id>'0' and status=1 and location = ORDER BY id asc LIMIT 1

错误位置

FILE: /Data/www/ThinkPHP/Lib/Driver/Db/DbMysql.class.php  LINE: 320

TRACE

[19-12-09 09:49:12] /Data/www/ThinkPHP/Lib/Driver/Db/DbMysql.class.php (320) trace(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 id asc LIMIT 1' at line 1
[ SQL语句 ] : SELECT `id`,`title` FROM `hd_news` WHERE id>'0' and status=1 and location = ORDER BY id asc LIMIT 1 , , ERR)
[19-12-09 09:49:12] /Data/www/ThinkPHP/Lib/Driver/Db/DbMysql.class.php (107) DbMysql->error()
[19-12-09 09:49:12] /Data/www/ThinkPHP/Lib/Core/Db.class.php (739) DbMysql->query(SELECT `id`,`title` FROM `hd_news` WHERE id>'0' and status=1 and location = ORDER BY id asc LIMIT 1 )
[19-12-09 09:49:12] /Data/www/ThinkPHP/Lib/Core/Model.class.php (497) Db->select(Array)
[19-12-09 09:49:12] /Data/www/company/Home/Lib/Action/NewsAction.class.php (28) Model->select()
[19-12-09 09:49:12] () NewsAction->detail()
[19-12-09 09:49:12] /Data/www/ThinkPHP/Lib/Core/App.class.php (169) ReflectionMethod->invoke()
[19-12-09 09:49:12] /Data/www/ThinkPHP/Lib/Core/App.class.php (205) App::exec()
[19-12-09 09:49:12] /Data/www/ThinkPHP/Lib/Core/Think.class.php (39) App::run()
[19-12-09 09:49:12] /Data/www/ThinkPHP/Common/runtime.php (243) Think::start()
[19-12-09 09:49:12] /Data/www/ThinkPHP/ThinkPHP.php (30) require(/Data/www/ThinkPHP/Common/runtime.php)
[19-12-09 09:49:12] /Data/www/company/index.php (26) require(/Data/www/ThinkPHP/ThinkPHP.php)