Welcome Guest, Not a member yet? Register   Sign In
$query->row() returns array ALWAYS
#1

[eluser]kmanlove[/eluser]
If I do something like
Code:
$query = $this->db->get($this->table, $this->limit, $this->offset);        
return $query->row();
and that certain get() doesn't actually find a record (doesn't exist, for instance), row() returns an array.

I can't think of a time when I would ever want it return an array instead of an object just because it's empty.

Even if specify through row(0, 'object'), it still comes back as an empty array instead of an empty object. I've looked at DB_result.php and can't find where this is happening. Any help with this would be great. Maybe I'm missing something.

Thanks,
Keith


Messages In This Thread
$query->row() returns array ALWAYS - by El Forum - 05-18-2010, 10:31 AM
$query->row() returns array ALWAYS - by El Forum - 05-18-2010, 10:49 AM
$query->row() returns array ALWAYS - by El Forum - 05-18-2010, 10:51 AM
$query->row() returns array ALWAYS - by El Forum - 05-18-2010, 02:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB