How to return 10 in 10 rows of select by clicking a php button

Asked

Viewed 171 times

0

I have a lot of data in a database and need to display it in php. Since I have for example 100 lines, I won’t display them all at once because the page would be unstructured.

The idea eh, display the last 10 lines first. If the user clicks a button mais, displays the other 10 and so on until all 100 are finished, as in Gmail.

How do you do it?

  • Post the code you already made. I suggest a search about pagination.

1 answer

0

select * from clientes where ativo = 'S' limit 0, 10

Create variables to change the value more or less. Ex.: The Forward button increases 10 and so on...

  • I’m sorry, I didn’t quite understand your suggestion, actually, and I have no idea where I’m going to apply those variables. Will they serve no limit???. Of the type two variables of the limit, one from the beginning, the other from the end???. I ask to clarify a little with more details

Browser other questions tagged

You are not signed in. Login or sign up in order to post.