Pagination negative offset |
Imagine page has Pagination,when use follow code to implement Pagination limit
Code: $data ['list'] = $this->test_model->get_list ( $per_page, $this->uri->segment ( 2 )); Now lets say user modify segment to -20 (negative value), code will give error Code: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-20, 20' at line 4 how we can solved this issue? currently I'm using following code to avoid mention issue..is any better way? Code: $offset = NULL; Thank You |
Messages In This Thread |
Pagination negative offset - by DarkKnight - 06-17-2020, 10:57 AM
RE: Pagination negative offset - by paulkd - 07-04-2020, 01:14 AM
RE: Pagination negative offset - by CINewb - 07-16-2020, 04:14 AM
|