CodeIgniter Forums
How to limit findall result - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Model-View-Controller (https://forum.codeigniter.com/forumdisplay.php?fid=10)
+--- Thread: How to limit findall result (/showthread.php?tid=81101)



How to limit findall result - Kordianz - 01-24-2022

Hi,
I try like this:
Code:
$data['wpisy']=$model->select('id,tytul,data_publikacji,opis_meta,obrazek')                             
                              ->limit(3)
                              ->orderBy('data_publikacji', 'DESC')
                              ->findAll();

But, Limit not works.
thanks for answer



RE: How to limit findall result - iRedds - 01-24-2022

Pass the value directly to the findAll() method instead of using limit().


RE: How to limit findall result - Kordianz - 01-25-2022

Thanks!!