View Single Post
08-04-2008, 06:13 PM
#2
Jako is offline Jako
Jako's Avatar
Status: Jakowenko.com
Join date: Jun 2005
Location: Michigan
Expertise:
Software:
 
Posts: 2,199
iTrader: 3 / 100%
 

Jako is on a distinguished road

  Old

I've been just getting into PHP lately, so I'm not 100% sure on this, but this is what I use on one of my queries.

PHP Code:
$image_id "SELECT * FROM images ORDER BY i_id DESC LIMIT 1"
This is sorting my table by the i_id, newest one being on the top and I'm limiting the results to 1, which is the newest entry.

So for yours maybe try

PHP Code:
$queryRecent "SELECT name FROM table ORDER BY id DESC LIMIT 10"