Welcome Guest, Not a member yet? Register   Sign In
Returning all results from a SQL query as one array
#1

[eluser]charlieD[/eluser]
I'm using the database class to return some results and at the moment I'm using the $query->row_array() method in a foreach loop. I'm passing this back to the controller for display.

Is there a function that returns all the rows from the result in one array? So I can do something like:

Code:
return $result->fetch_all_rows();
#2

[eluser]charlieD[/eluser]
Sorry, I am an idiot.
For reference, it's:

return $result->result_array();




Theme © iAndrew 2016 - Forum software by © MyBB