Query To Retrieve Last 10 Rows In MySQL Using PHP Code
- Forums
- MySQL
- Query To Retrieve Last 10 Rows In MySQL Using PHP Code
this is the query you can use to query the last 10 rows in mysql database [931], Last Updated: Sat May 18, 2024
wallpaperama
Mon Jun 13, 2011
1 Comments
2956 Visits
hi mel, this is the query you can use to query the last 10 rows in mysql database
$SQL = "SELECT * FROM myTable ORDER BY FieldID DESC LIMIT 10";
the above query tells mysql that you want to select the last 10 rows from the myTable in you database
hope that helps