Mysql
 sql >> Base de données >  >> RDS >> Mysql

requête imbriquée d'enregistrement actif codeigniter

il vous suffit de consulter la Documentation Codeigniter

     $this->db->select('sss.*, c.country_name, c.country_code ');
       $this->db->from('(SELECT gr.* 
       FROM (`be_goldrate` as `gr`) 
      WHERE `gr`.`country_id` != 0 
        AND `gr`.`rate_type` = "calculated" 
       ORDER BY gr.date DESC) as sss');
       $this->db->join('be_countries as c','c.country_id = sss.country_id','left');

       $this->db->group_by('sss.country_id'); 

veuillez signaler toute erreur