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";