Use select_min in model function query - 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: Use select_min in model function query (/showthread.php?tid=60896) |
Use select_min in model function query - El Forum - 07-25-2014 [eluser]Unknown[/eluser] Hi all I have a little problem using "$this->db->select_min" in a model function. I have 2 functions in model: first must return all results if a clause is true (this works fine). The second one must select and return the smallest value finded in database column table for each row from first function. First function Code: function recomended_offers($id) Code: function recomended_offers_price($recomended_offers) The commented lines from seconf function I tried to use for selecting smallest value but with no luck |