Basic sorting - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Basic sorting (/showthread.php?tid=45409) |
Basic sorting - El Forum - 09-20-2011 [eluser]Michal1[/eluser] Hi guys, I am trying to sort my data by a function in parameters but it does not work allright. I basically have a dropdown in view and I want to take selected value, pass it into function and use it in where clause in model to get data if it is matched. It sounds kinda complicated but I think you will get what I want once you see a code. So in my site_view I have Code: <?php echo form_open('site/order'); ?> Then in controller site I have a functin order and inside Code: public function order() In order_view I of course display data like Code: <?php if (isset($backlinks)) : foreach ($backlinks as $row) : ?> And then in site_model I have a Code: function get_order($parameter) |