Mysql
 sql >> Datenbank >  >> RDS >> Mysql

Wie kann man eine Tabelle in Codeigniter korrekt aliasieren?

Versuchen Sie vielleicht, s_series as s zu verschieben ...

public function getEpisodes($limit = 12, $order = 'id_e', $das = 'desc')
    {
        $this->db->select('e.id_e, e.id_s, e.num_e, s.id_s, s.nom_s, s.thumb_s')

               // Move s_series as s
                 ->from('s_episodes as e')
                 ->join('s_series as s', 'e.id_s = s.id_s', 'left')


                 ->order_by('e.'.$order, $das)
                 ->limit($limit);
        $query = $this->db->get();

        return $query->result_array();
    }