• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Change order of foreach loop?

#7
[eluser]Dready[/eluser]
Hello,

you must not add order by at the end of your active record query. Try :
Code:
$data['query'] = $this->db->order_by('date','desc')->get_where('listings', array('isactive' => 1));

In this example I suppose you have a "date" column in your table.


Messages In This Thread
Change order of foreach loop? - by El Forum - 09-25-2008, 07:47 PM
Change order of foreach loop? - by El Forum - 09-25-2008, 08:09 PM
Change order of foreach loop? - by El Forum - 09-25-2008, 09:47 PM
Change order of foreach loop? - by El Forum - 09-25-2008, 10:11 PM
Change order of foreach loop? - by El Forum - 09-25-2008, 10:13 PM
Change order of foreach loop? - by El Forum - 09-26-2008, 07:49 AM
Change order of foreach loop? - by El Forum - 09-26-2008, 08:25 AM
Change order of foreach loop? - by El Forum - 09-26-2008, 06:17 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.