CodeIgniter Forums

Full Version: Active Class DB problem
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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

El Forum

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

El Forum

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