PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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.
$query = "SELECT * FROM analyst ORDER BY id DESC LIMIT 50";
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).
whoops. A closer look at my code made me realize that it wasn't running that query, the problem appears to be solved. Sorry for wasting your time, and thanks for your help.