Creating custom 'order_by' string |
[eluser]MABUS[/eluser]
Hi, Is there a way to ORDER BY a specified CASE or IF in CodeIgniter? Right now, I am having to write my entire query in SQL. I'm curious to find out if there is a CI way to do this. In addition to this, I also want to know if active record class methods is able to handle additional query strings.
[eluser]Jilani Jidni[/eluser]
[quote author="MABUS" date="1219746947"]Hi, Is there a way to ORDER BY a specified CASE or IF in CodeIgniter? Right now, I am having to write my entire query in SQL. I'm curious to find out if there is a CI way to do this. In addition to this, I also want to know if active record class methods is able to handle additional query strings.[/quote] Please read the active record manual and hope you will get your solution http://ellislab.com/codeigniter/user-gui...ecord.html
[eluser]newsun[/eluser]
While reading the above mentioned TOC section look for this part: Code: $this->db->order_by(); |
Welcome Guest, Not a member yet? Register Sign In |