0

I have a database with a table having a big number of rows. I am fetching the data in this table and displaying it in an HTML table on a web page.

My requirement is to display 20 records initially and then when the user clicks a button labelled Next, I show the next 20 records and so on...

So I have initially fetched first 20 rows from the table in my PHP (server-side), and then assigned a JS function to the onclick attribute of the button labelled Next. Inside this JS function, I use an AJAX call which brings me the next 20 rows. Then within this JS function, I replace the HTML rows with these new rows.

I need something like this:

enter image description here

The question is that are there any plugins available which can implement that functionality for me? If a plugin is available, implementing it manually wouldn't make sense because being a rookie, I can't develop it better than the developers of that plugin.

2
  • You can use jqGrid Commented Nov 27, 2016 at 8:10
  • you may use any jquery plugin for pagination , jqgrid is my favourite Commented Nov 27, 2016 at 8:11

1 Answer 1

1

Yes

This is called pagination - a quick search for "ajax pagination mysql php" or similar brings up a wide range of options. I can't recommend any particular one as your question is too broad; I can only reasonably go as far as a definition.

Internally they use the MySQL LIMIT keyword which may help give further things to search for or experiment with depending on your actual use case.

Sign up to request clarification or add additional context in comments.

4 Comments

Thank you Luke Briggs. I did Not know that it's called pagination. So thank you. Besides, I think now that I know what it is called, I can easily google for plugins. So it does answer the question I guess. @icecub
@icecub Yeah I also feel that although this answer did help me out, they can include the name of a plugin or something like that, and that will answer the question perfectly (I believe)
@icecub But I am not asking for the Best plugin. I am rather asking if plugins exist for that purpose. That is a simple yes or no. Isn't it?
@icecub You could encourage me a bit as well :s Anyways I will delete my question in a few minutes, as SO people are expected to close it anyway (so I should at least beat them to the punch)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.