组合条件in和notin在组合条件里解析不正常

浏览:2576 发布日期:2013/08/07
3.1.2 - 普通 - 未处理
->where(array('id' => array(array('lt', 10), array('notin', array(1, 2))), 'id' => array('notin', array(1, 2))))这个where生解析出的结果是WHERE ( (`id` < 10) AND (`id` NOT IN Array)  )修正为Db.class.php第484行$whereStr .= '('.$key.' '.$op.' '.$this->parseValue($data).') '.$rule.' ';
//改为
$whereStr .= '('.$this->parseWhereItem($key,$val[$i]).') '.$rule.' ';
而且notin和not in也没有统一//第464行
$whereStr .= $key.' '.strtoupper($val[0]).' ('.$zone.')';
改成下面
$val[0]    = strtolower($val[0]) == 'not in'?'notin':strtolower($val[0]);
$whereStr .= $key.' '.$this->comparison[$val[0]].' ('.$zone.')';
评论(
后面还有条评论,点击查看>>