[eluser]patrick-vibes[/eluser]
Hi,
I am trying to order my results by date to show latest portfolio items limited to 10 order by most recent.
The code I have to retrieve the results, that works fine is:
Code:
$data['query'] = $this->db->get('portfolio' , 10);
but am am not sure how to order this by date - whether I need to use the more convoluted PHP way like SELECT from ORDER BY date or if something like this is the better way:
Code:
$data['query'] = $this->db->get('portfolio' , 10);
$data['query'] = $this->db->orderby("date", "ASC");
I know it might be a simple question but I have had a good trawl through the userguide and forum and can not find a simple answer.
Thanks in advance.