Tuesday, 9 September 2014

PHP Paging

I have made a website for flat selling. Many customer enquiries daily for flat booking by filling enquiry form. I have made an admin page which shows enquiry data of customer, everything was ok but when enquiry got increase then admin page data also increase so my client had to scroll very long that was not a good interface. So I decided to show enquiry table content page wise.
Thanks to limit clause used by MYSQL. You can use limit clause with select statement for limit the returns row from database, its takes two clause as a record number start and stop

I.e. Select * from Enquiry limit 0, 10

You can change limit clause argument for desire row, fist number for start and second one stand for stop retrieving row form table.

Click here to download full example

No comments:

Post a comment