Welcome Guest, Not a member yet? Register   Sign In
Adding where clause to count_all
#1

[eluser]Wonder Woman[/eluser]
Hi,

I basically just want to add a where clause to my count all request - is there anyway I can add this on to what I have?

I currently have:
Code:
$this->db->count_all('comments');

but I would typically like:
Code:
$this->db->count_all('comments')->where('approved', 1);

or something similar.

Any help would be appreciated.

Thanks.


Messages In This Thread
Adding where clause to count_all - by El Forum - 07-21-2011, 09:35 AM
Adding where clause to count_all - by El Forum - 07-22-2011, 02:23 AM
Adding where clause to count_all - by El Forum - 07-22-2011, 11:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB