php - This is my MySQL query, how to write in CodeIgniter? -


this mysql query , how write in codeigniter

select distinct a.user_name wl_customers     inner join tbl_bid b on a.customers_id = b.customers_id     inner join tbl_portfolio c on b.portfolio_id=c.portfolio_id  c.portfolio_id='16' 

using active records

    $this->db->select('distinct a.user_name');     $this->db->from('wl_customers a');      $this->db->join('tbl_bid b','a.customers_id=b.customers_id');     $this->db->join('tbl_portfolio c','b.portfolio_id=c.portfolio_id');     $this->db->where('c.portfolio_id',16,false);     $query = $this->db->get(); 

Comments

Popular posts from this blog

qt - QML MouseArea onWheel event not working properly when inside QML Scrollview -

java - is not an enclosing class / new Intent Cannot Resolve Constructor -

python - Error importing VideoFileClip from moviepy : AttributeError: 'PermissionError' object has no attribute 'message' -