Grabbing the last 50 entries in a database
Posted: Sat Feb 03, 2007 9:18 pm
Hi, I'm just trying to grab the last 50 entries in a database ordered by their id number. The problem is the syntax I'm using just grabs 1-50, and I'm not sure why.
Here is my query:
Yet it seems to order them by 'name' rather than 'id', because it is showing entries 1-50 ascending (rather than what should currently be entries 67 through 17).
Any idea what to do?
thanks...
Here is my query:
Code: Select all
$query = "SELECT * FROM analyst ORDER BY id DESC LIMIT 50";Any idea what to do?
thanks...