Limit number of rows in a table [closed]

0

What friends, the question I have is this: I have a table connected to a database, every time you enter a value is automatically updated, the problem I have is that it shows me all the values of the database, how can I limit those rows to show me only a specific number of values, that is, while updating, for example, it shows 15 values, and it is hiding the others! I'm not using Datatables!

    
asked by Staz 05.04.2017 в 15:06
source

1 answer

3

I think you mean an SQL query?

Example: With this query we will obtain 10 records of our DB.

$var = "SELECT * FROM usuarios LIMIT 10";

Get the last 10 records:

$var= "SELECT * FROM usuarios ORDER BY id DESC LIMIT 10";  
    
answered by 05.04.2017 / 15:46
source