Web Development Guides and Tutorials

  • facebook
  • twitter
  • github

Filtering and pagination in Simple MVC Framework

20th Mar 2016 19:47:34 PHP, SMVCF by Kerry Owston

Filtering is useful when you have a list of records and need to drill down into your data to retrieve only the records that match certain criteria without having to sift through records that are Irrelevant. Data that is irrelevant would not be returned. Data that is relevant will be listed.

You may have a marketing campaign for a product and a list of contacts. instead of targeting everyone you can just target the people that have previously registered an interest in your type of product. 

Pagination is useful when you have a long list of records, it doesn’t matter if they have been filtered or not the list of records shown on one page should not match the number of records retrieved. Instead they should be split across pages with a set amount per page. Say you have 57 records with 20 showing per page, in this case you will have page 1 with 20 records, page 2 with 20 records and page 3 with 17 records.

Filtering and pagination work great together in SMVCF. This tutorial explains how.