$categoods1 = M()->db(2,'a')->table('yp_goods')->field( 'goods_thumb,goods_video')->where($map)->select(); 查询goods_thumb,goods_video 用到了field
and查询 $User = M("User"); // 实例化User对象 $map['status'] = 1; $map['title'] = 'thinkphp'; // 把查询条件传入查询方法 $User->where($map)->select(); '_multi'=>true必须加在数组的最后,表示当前是多条件匹配,这样查询条件就变成 status= 1 AND title = 'thinkphp'
$map['user_id'] =$user_id; $map['type'] ='22'; $map['date'] =array('between',array($start,$end)); $daymoney = M('Log')->where($map)->sum('amount');