Welcome Guest, Not a member yet? Register   Sign In
Can I: get() and count_all_results() within the same $this->db
#1

[eluser]Matrices[/eluser]
Here's my code:

Code:
$this->db->where('username', $_POST['username']);
$this->db->where('password', $_POST['password']);
$query = $this->db->get('accounts');
$rows = $this->db->count_all_results('accounts');

I'm running into a problem where the $rows counted are ALL the rows from the database, which means the filter is only working for the first query, in the 3rd row. Is there a way that I can use the filter created within the first two lines to work for more than just the first query line? Or do I have to reintroduce the filter for the second query?


Messages In This Thread
Can I: get() and count_all_results() within the same $this->db - by El Forum - 08-25-2008, 01:09 PM



Theme © iAndrew 2016 - Forum software by © MyBB