php - using LIMIT 0, 20 for infinite scroll - how to limit the number of total results? -
i have query:
select * table id not null order desc limit :start, :limit the start , limit there ajax infinite scroll / pagination work
how can limit total results if im using limit pagination?
i need query similar below:
select * table id not null order desc limit :start, :limit limit 5000
you can calculate without query. if don't want more 5000 results, should work:
if (($start + $limit) <= 5000) { // query } else { // don't query, maximum limit reached }
Comments
Post a Comment