$type = 0;
$page = $_REQUEST['page'];
$where['n.today'] = array('gt', 0);
$where['n.yes'] = array('gt', 0);
$where['n.week'] = array('gt', 0);
$where['n.month'] = array('gt', 0);
$where['_logic'] = 'or';
$map['_complex'] = $where;
$map['n.type'] = $type;
$res = M('pay_num as n')
-> field('n.*,v.nickname,v.name,v.headimgurl,v.saleuid')
-> join('wechat_vip as v ON v.unitid = n.unitid')
-> where($where)
-> order('n.today desc')
-> limit($page,10)
-> select();SELECT n.*,v.nickname,v.name,v.headimgurl,v.saleuid FROM wechat_pay_num as n INNER JOIN wechat_vip as v ON v.unitid = n.unitid WHERE n.today > 0 OR n.yes > 0 OR n.week > 0 OR n.month > 0 ORDER BY n.today desc LIMIT 0,10 最佳答案