时间:2021-07-01 10:21:17 帮助过:17人阅读
$map['id'] = I('get.id');
$map['cid'] = i('get.cid');
$m->where($map)->find();
SELECT `id`,`title`,`pic` FROM `news` WHERE `id` = null AND `cid` = null LIMIT 0,12
$map['id'] = I('get.id');
$map['cid'] = i('get.cid');
$map = array_diff($map, array('')); //过滤掉空元素
$m->where($map)->find();