Welcome Guest, Not a member yet? Register   Sign In
Select as with non unique results
#3

[eluser]danmontgomery[/eluser]
Just to explain this (even though you found a different solution), even though you are differentiating between tables for the "name" column, the table name isn't included in the result, so you were getting back 2 "name" columns, and PHP doesn't handle non-unique array keys. The simple solution would be to just assign aliases for the result columns:

Code:
$this->db->select('p.id AS p_id, l.id AS l_id, p.active, p.name AS p_name, l.name AS l_name');


Messages In This Thread
Select as with non unique results - by El Forum - 03-22-2010, 06:01 PM
Select as with non unique results - by El Forum - 03-22-2010, 08:14 PM
Select as with non unique results - by El Forum - 03-23-2010, 07:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB