/* 根据模糊的where条件 */
public function gcfstm($kw){
$val='%'.$kw.'%';
$where['position']=array('li
return $where;
}
$red=$this->gcfstm($_POST['search']);
$where['_logic'] = 'OR';
$where=$red+$where;
return $this->where($where);
$count=$Recruit->count();
这是是代码片段,最终运行的mysql语句为:
SELECT COUNT(*) AS tp_count FROM `demo_recruit` WHERE ( `position` li
该语句返回false
尝试执行该语句
提示#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 'li
错误!
在phpmyadmin中
SELECT COUNT(*) AS tp_count FROM `demo_recruit` WHERE `position` LIKE '%采购%';
这个语句是可以执行行的结果为8;
最佳答案