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

[eluser]Richard Schumann[/eluser]
will give me an array with 10 rows and a rowcount of 10 ...

but i want an array with 10 rows and a rowcount of all 50.000 rows ...

so like this :

$query = $this->db->from('user')->bla-bla
->bla-bla
->bla-bla
->a lot of if else
->bla-bla joins
->bla-bla stuff
$num_rows = $query->num_rows();
+ then just the limit
->limit($entryspersite,$offset)
+ and the get
$result = $query->result_array();

but after the num_rows() OR the get()

the start of my querry is empty again so i have to repeat myself with the full long code


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



Theme © iAndrew 2016 - Forum software by © MyBB