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

#1
[eluser]slaction[/eluser]
I am using the foreach loop code from the video tutorial to show the rows in my database. The problem is I want to show the newest rows on top but the loop currently just adds the new rows to the bottom of the list.

How would I go about changing the order of the items. I looked at the order_by() part of active record, but I'm already using get_where() and I didn't know how to add order_by on top off my get_where.

Any help would be great.

thanks


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.