CI 多表关联查询
2024-11-23 18:15:06
方法一:$this->db->query("sql 语句"); 直接写sql语句 方法二: #多表关联查询 $data=$this->db->from('goods') ->join('shop','shop.shopid=goods.shopid') ->join('category','category.cid=goods.cid') ->join('locality','locality.lid=goods.lid') ->get()->result_array(); return $data;