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 ? Thanks
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.