Welcome Guest, Not a member yet? Register   Sign In
database question -> get rows from complex query AND results in ONE query ?!
#7

[eluser]WanWizard[/eluser]
He, we're trying to help here, this attitude doesn't get you anywhere.

num_rows() gives you the number of rows in a result set, the result of a query. You don't actually HAVE a result set until AFTER you run the query. Or do you thing magic is involved?

If you want to know the number of rows in your user table, you can do:
Code:
$rows = $this->db->count_all('user');

You're not asking for a result count (noctrum told you how to do that), you are asking for two DIFFERENT results from ONE single query.

I strongly suggest you start RTFM. This looks like a good start...


Messages In This Thread
database question -> get rows from complex query AND results in ONE query ?! - by El Forum - 05-17-2010, 02:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB