Welcome Guest, Not a member yet? Register   Sign In
$this->db->count_all_results() returning 1 instead of 0
#4

[eluser]Aken[/eluser]
Don't use count_all_results() in the first place, because if you want to do that AND return a row, you'll need to run two queries.

Use $query = get_where(...), and then $query->num_rows() to check the rows returned.


Messages In This Thread
$this->db->count_all_results() returning 1 instead of 0 - by El Forum - 07-30-2012, 07:00 AM
$this->db->count_all_results() returning 1 instead of 0 - by El Forum - 07-30-2012, 08:25 AM
$this->db->count_all_results() returning 1 instead of 0 - by El Forum - 07-30-2012, 08:32 AM
$this->db->count_all_results() returning 1 instead of 0 - by El Forum - 07-30-2012, 07:21 PM



Theme © iAndrew 2016 - Forum software by © MyBB