thinkphp数组查询问题
thinkphp中查询条件为
$map['id'] = I('get.id');<br />$map['cid'] = i('get.cid');<br />$m->where($map)->find();
SELECT `id`,`title`,`pic` FROM `news` WHERE `id` = null AND `cid` = null LIMIT 0,12
$map['id'] = I('get.id');<br />$map['cid'] = i('get.cid');<br />$map = array_diff($map, array('')); //过滤掉空元素<br />$m->where($map)->find();