• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Active Class DB problem

#1
[eluser]Ngulo[/eluser]
hi all ,i'm trying to order_by() my data from db

i would like to order them by 2 parametres and i can't do it without your suggestions

i need something like this:
Code:
$this->db->order_by('data ASC , hour DESC')->get('table');

now i'm trying very stupid method ,and they aren't still working Tongue, how can i write this code to make it works?

thanks a lot anticipated Wink

#2
[eluser]WanWizard[/eluser]
Something like:
Code:
$this->db->order_by('data', 'ASC')->order_by('hour', 'DESC')->get('table');
?

#3
[eluser]Ngulo[/eluser]
yeah man Wink thanks for the great explain Wink


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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