vendredi 27 février 2015

Codeigniter Aliase not working in Views

i wrote a lot of code in codeigniter but i had to restructure my database column prefixes and when i use join queries to join some of my tables in my model's queries there is some tables in one query that have the same id column , i used Alias 'As alias1' for a table name, and model runs successfully without problem but when i pass the $q = $this->db->get() variable to my controller and then pass it to my view and iterate it like this : foreach($q->result() as $res) echo $res->alias1.id; php errors that unknown $alias1.id but i declared alias1 for one of my tables whats the problem ? tnx





Aucun commentaire:

Enregistrer un commentaire