リスト用にcodeigniterに結合関数が1つありますが、結合するのは2つのテーブルのみです。3つのテーブルの場合、別の関数を使用する必要があります。これらの関数を任意の数の結合に共通にする方法はありますか モデルコード
public function __construct()
{
$this->load->database();
}
//listing with join for two tabels
public function get_joinlist($table,$value,$table2,$condi,$join_type,$order_by,$order,$where,$limit, $offset)
{
$this->db->select($value);
$this->db->join($table2,$condi,$join_type);
$this->db->order_by($order_by,$order);
$this->db->where($where);
return $query= $this->db->get($table, $limit, $offset);
}
//listing with join for three tabels
public function get_joinlist1($table,$value,$table2,$condi1,$join_type1,$table3,$condi2,$join_type2,$where,$order_by,$order)
{
$this->db->select($value);
$this->db->join($table2, $condi1,$join_type1);
$this->db->join($table3, $condi2,$join_type2);
$this->db->where($where);
$this->db->order_by($order_by,$order);
return $this->db->get($table);
}