Jump to content

Limited Data Displayed


nielcleo

Recommended Posts

Hi,anyone here can help me about getting data from the database with a limited row to be display for example only get 5 rows or 10..for example..in the database i inputed 2 new item having productID 2 and 3 ProductID ProductName------------- -----------------1 name 12 name 23 name 3 and in the page it will only display the two new item or more.. NEW ITEM----------------3 name 32 name 2 and if inputed another new item it will update NEW ITEM----------------4 name 43 name 3mostly when using a while loop it will display all the content of the database..anyone here can help me please? thanks a lot

Link to comment
Share on other sites

When using a query, use the LIMIT clause to choose where to start and how many results to retrieve. The following example starts retrieving from the tenth record and retrieves 5 results,

SELECT * FROM table ORDER BY field LIMIT 10,5

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...