:(

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.publishstatus=1 and a.id=b.bookid order by a.viewnum desc, a.id asc limi' at line 1 [ SQL语句 ] : select a.id,a.bookimg,a.bookname,a.writername,a.bookintro,a.endstatus,a.publishstatus,a.publishtime,a.recomtext,a.bookcnt,a.classname,a.classpath,a.shortname,a.collect,a.weekcollect,a.monthcollect,a.weekviewnum,a.monthviewnum,a.viewnum,a.weeksubnum,a.monthsubnum,a.subnum,a.reward,a.weekreward,a.monthreward,a.weekyuepiao,a.monthyuepiao,a.yuepiao,a.userscore from viewbookinfo a, ds_book_special_data b where b.specialid= and a.publishstatus=1 and a.id=b.bookid order by a.viewnum desc, a.id asc limit 0,10

错误位置

FILE: /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/Db/Driver.class.php  LINE: 350

TRACE

#0 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/Db/Driver.class.php(350): E('1064:You have a...')
#1 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/Db/Driver.class.php(180): Think\Db\Driver->error()
#2 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/Model.class.php(1382): Think\Db\Driver->query('select a.id,a.b...')
#3 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Org/WangWenYunApp/DS/Model/BookSpecialDataModel.class.php(147): Think\Model->query('select a.id,a.b...')
#4 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Org/WangWenYunApp/DS/Template/function.php(186): Org\WangWenYunApp\DS\Model\BookSpecialDataModel->getspecialbooklist(NULL, 'viewnum', 'total', 1, 10, 50)
#5 [internal function]: wwy_book_getspecialbooklist(false, NULL, 'viewnum', 'total', 1, 10, 50)
#6 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Org/WangWenYun/Template/function.php(72): _349243334('wwy_book_getspe...', Array)
#7 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Org/WangWenYunApp/DS/Template/function.php(183): wwy_cachefunc(Array)
#8 /www/wwwroot/shuxiang/www/Runtime/Cache/Home/57a01a1d1f7a6af977806f87f11c38fd.php(1): wwy_book_getspecialbooklist(true, NULL, 'viewnum', 'total', 1, 10, 50)
#9 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/Storage/Driver/File.class.php(80): include('/www/wwwroot/sh...')
#10 [internal function]: Think\Storage\Driver\File->load('./Runtime/Cache...', Array, NULL, 'tpl')
#11 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/Storage.class.php(37): _349243334(Array, Array)
#12 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/Template.class.php(77): Think\Storage::__callstatic('load', Array)
#13 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/Template.class.php(77): Think\Storage::load('./Runtime/Cache...', Array, NULL, 'tpl')
#14 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Behavior/ParseTemplateBehavior.class.php(32): Think\Template->fetch('./Public/skin/s...', Array, '')
#15 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/Hook.class.php(119): Behavior\ParseTemplateBehavior->run(Array)
#16 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/Hook.class.php(89): Think\Hook::exec('Behavior\\ParseT...', 'view_parse', Array)
#17 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/View.class.php(126): Think\Hook::listen('view_parse', Array)
#18 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/View.class.php(72): Think\View->fetch('extend/zhongtia...', '', '')
#19 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/Controller.class.php(56): Think\View->display('extend/zhongtia...', '', '', '', '')
#20 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Org/WangWenYun/Core/Controller/CorePageController.class.php(801): Think\Controller->display('extend/zhongtia...')
#21 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Org/WangWenYun/Core/Controller/CoreTemplateController.class.php(36): Org\WangWenYun\Core\Controller\CorePageController->skindisplay('extend/zhongtia...')
#22 [internal function]: Org\WangWenYun\Core\Controller\CoreTemplateController->wwytemplate()
#23 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/App.class.php(173): ReflectionMethod->invoke(Object(Home\Controller\TemplateController))
#24 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/App.class.php(110): Think\App::invokeAction(Object(Home\Controller\TemplateController), 'wwytemplate')
#25 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/App.class.php(204): Think\App::exec()
#26 /www/wwwroot/shuxiang/www/ThinkPHP/Library/Think/Think.class.php(120): Think\App::run()
#27 /www/wwwroot/shuxiang/www/ThinkPHP/ThinkPHP.php(97): Think\Think::start()
#28 /www/wwwroot/shuxiang/www/index.php(46): require_once('/www/wwwroot/sh...')
#29 {main}