系统出现异常

异常位置: FILE: D:\virtualhost\localuser\host6378320\www\coolphp\model.php LINE: 328

[ 提示信息 ]

执行[SELECT * FROM `news` WHERE ((`id` < '757' AND `category_id` = )) ORDER BY id desc LIMIT 0,1]SQL查询语句出现错误:
[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 id desc LIMIT 0,1' at line 1]

[ 详情 ]

请求网址:/index.php
326: return $rs;
327: }
328: $result = $this->db->query($sql);// 数据库
329: if($result===false){
330: $this->setError('sql_query_error');

[ 追踪 ]

[24-03-29 07:03:03] D:\virtualhost\localuser\host6378320\www\coolphp\model.php (328) Db->query(SELECT * FROM `news` WHERE ((`id` < '757' AND `category_id` = )) ORDER BY id desc LIMIT 0,1)
[24-03-29 07:03:03] D:\virtualhost\localuser\host6378320\www\coolphp\model.php (248) Model->find(array ( 'limit' => 1, 'order' => 'id desc', 'where' => array ( 'id <' => '757', 'category_id' => NULL, ),), 0)
[24-03-29 07:03:03] D:\virtualhost\localuser\host6378320\www\app\controller\news.php (25) Model->__call(findByCond, array ( 0 => array ( 'id <' => '757', 'category_id' => NULL, ), 1 => 1, 2 => 'id desc',))
[24-03-29 07:03:03] D:\virtualhost\localuser\host6378320\www\app\controller\news.php (25) AppModel->findByCond(array ( 'id <' => '757', 'category_id' => NULL,), 1, id desc)
[24-03-29 07:03:03] () News->view()
[24-03-29 07:03:03] D:\virtualhost\localuser\host6378320\www\coolphp\controller.php (144)
[24-03-29 07:03:03] D:\virtualhost\localuser\host6378320\www\coolphp\app.php (100) Controller->exec(view)
[24-03-29 07:03:03] D:\virtualhost\localuser\host6378320\www\index.php (25) App->run()

CoolPHP 1.0 { 欢迎使用CoolPHP MVC开发架构 } -- [ It being cool... ]