Welcome Guest, Not a member yet? Register   Sign In
return number of rows
#3

[eluser]john_j[/eluser]
what it returns is correct, it has to return '1' because there is only one row.

Do something like this to get the count:
Code:
$result = $this->db->query('select count(*) as total_count from some_table');
if ($result != false)
{
   $my_count = $result->row();
   echo 'Total Count = '.$my_count->total_count;
}


Messages In This Thread
return number of rows - by El Forum - 09-18-2012, 02:09 AM
return number of rows - by El Forum - 09-18-2012, 02:14 AM
return number of rows - by El Forum - 09-18-2012, 02:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB