Welcome Guest, Not a member yet? Register   Sign In
Easy ActiveRecord questions
#3

[eluser]Armchair Samurai[/eluser]
Use aliases and always be specific which columns you are calling. For example
Code:
$this->db->select('u.foo, c.foo AS collection_foo');
$this->db->join('collection c', 'u.collection_id = c.collection.id');
$this->db->where('u.user_id', $user_id);
$query = $this->db->get('user_access u');


Messages In This Thread
Easy ActiveRecord questions - by El Forum - 02-19-2009, 04:16 PM
Easy ActiveRecord questions - by El Forum - 02-19-2009, 05:08 PM
Easy ActiveRecord questions - by El Forum - 02-19-2009, 05:11 PM
Easy ActiveRecord questions - by El Forum - 02-19-2009, 10:56 PM
Easy ActiveRecord questions - by El Forum - 02-20-2009, 03:23 AM
Easy ActiveRecord questions - by El Forum - 02-20-2009, 06:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB