[eluser]minimal design[/eluser]
[quote author="m4rw3r" date="1209418104"]ummm, the
Code:
$result = $query->result_array();
foreach ($result as $entry) {
$entries[] = $entry;
}
is totally unnessesary, it only loops through the result and creating an exact duplicate of the result_array() return value.
So $result === $entries.
It would be a difference if you did some processing in the foreach, but now it's only a waste of CPU and RAM.[/quote]
I didn't mean that as a fully working example. It needs to be customized, and most of the time you'll need that loop to tweak your results... the "$sql = "SELECT * FROM etc..." won't work either...