:(

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 'index LIMIT 1' at line 1 [ SQL语句 ] : SELECT COUNT(a.id) AS tp_count FROM cm_book_info a LEFT JOIN cm_book_category b ON a.category_id=b.id LEFT JOIN cm_book_descr c ON a.book_id=c.book_id WHERE a.status=1 and a.read_limit=0 and a.platform=30 and a.category_id=index LIMIT 1

错误位置

FILE: /webuse/ayhy/ThinkPHP/Lib/Driver/Db/DbMysql.class.php  LINE: 320

TRACE

[19-06-27 12:59:06] /webuse/ayhy/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 'index LIMIT 1' at line 1
[ SQL语句 ] : SELECT COUNT(a.id) AS tp_count FROM cm_book_info a LEFT JOIN cm_book_category b ON a.category_id=b.id LEFT JOIN cm_book_descr c ON a.book_id=c.book_id WHERE a.status=1 and a.read_limit=0 and a.platform=30 and a.category_id=index LIMIT 1 , , ERR)
[19-06-27 12:59:06] /webuse/ayhy/ThinkPHP/Lib/Driver/Db/DbMysql.class.php (107) DbMysql->error()
[19-06-27 12:59:06] /webuse/ayhy/ThinkPHP/Lib/Core/Db.class.php (739) DbMysql->query(SELECT COUNT(a.id) AS tp_count FROM cm_book_info a LEFT JOIN cm_book_category b ON a.category_id=b.id LEFT JOIN cm_book_descr c ON a.book_id=c.book_id WHERE a.status=1 and a.read_limit=0 and a.platform=30 and a.category_id=index LIMIT 1 )
[19-06-27 12:59:06] /webuse/ayhy/ThinkPHP/Lib/Core/Model.class.php (713) Db->select(Array)
[19-06-27 12:59:06] /webuse/ayhy/ThinkPHP/Lib/Core/Model.class.php (239) Model->getField(COUNT(a.id) AS tp_count)
[19-06-27 12:59:06] /webuse/ayhy/ThinkPHP/Extend/Vendor/Info/Book/Book.class.php (175) Model->__call(count, Array)
[19-06-27 12:59:06] /webuse/ayhy/ThinkPHP/Extend/Vendor/Info/Book/Book.class.php (175) BookViewModel->count(a.id)
[19-06-27 12:59:06] /webuse/ayhy/www/Web/Lib/Action/BookAction.class.php (56) Book->Lists(1, 20, index, 0, 0, 0, 0, 0, )
[19-06-27 12:59:06] () BookAction->Booklist()
[19-06-27 12:59:06] /webuse/ayhy/ThinkPHP/Lib/Core/App.class.php (172) ReflectionMethod->invoke()
[19-06-27 12:59:06] /webuse/ayhy/ThinkPHP/Lib/Core/App.class.php (208) App::exec()
[19-06-27 12:59:06] /webuse/ayhy/ThinkPHP/Lib/Core/Think.class.php (39) App::run()
[19-06-27 12:59:06] /webuse/ayhy/ThinkPHP/Common/runtime.php (243) Think::start()
[19-06-27 12:59:06] /webuse/ayhy/ThinkPHP/ThinkPHP.php (30) require(/webuse/ayhy/ThinkPHP/Common/runtime.php)
[19-06-27 12:59:06] /webuse/ayhy/www/index.php (17) require(/webuse/ayhy/ThinkPHP/ThinkPHP.php)