Q:

How to select 1 row when joining table

My goal is to get Users and ONE latest entry user has created, I've tried to figure it out on google but I failed, so you're my last chance. On of things I tried:
        DB::select('SELECT u.id, u.username, u.user_rating, 
                        u.avatar, u.created_at, e.id as e_id, e.title 
                        FROM users u
                        LEFT JOIN 
                        (
                            SELECT e.*
                            FROM entry e
                            LIMIT 1
                        ) entry AS e ON e.user_id = u.id
                        ORDER BY u.user_rating DESC 
                        LIMIT 10

I'm using MySQL
EDIT:
with this it don't give me error, but it doesnt take any entry from join:
DB::select('SELECT u.id, u.username, u.user_rating, 
          u.avatar, u.created_at, e.id as e_id, e.title 
           FROM users u
           LEFT JOIN 
           (
               SELECT e.*
               FROM entry e
               ORDER BY e.id DESC
               LIMIT 1
           ) AS e ON e.user_id = u.id
            ORDER BY u.user_rating DESC 
            LIMIT 10');

The result:
object(stdClass)#437 (7) {
["id"]=>
int(5002)
["username"]=>
string(6) "Nelosh"
["user_rating"]=>
int(77763)
["avatar"]=>
string(3) "its"
["created_at"]=>
string(19) "2013-12-16 19:20:23"
["e_id"]=>
NULL
["title"]=>
NULL

}

A:

Try this: 
SELECT u.id, u.username, u.user_rating, u.avatar, u.created_at, e.id AS e_id, e.title 
FROM users u
LEFT JOIN (SELECT * FROM (SELECT * FROM entry e ORDER BY e.user_id, e.id DESC) AS e GROUP BY e.user_id) AS e ON e.user_id = u.id
ORDER BY u.user_rating DESC 
LIMIT 10;

OR
SELECT u.id, u.username, u.user_rating, u.avatar, u.created_at, e.id AS e_id, e.title 
FROM users u
LEFT JOIN (SELECT * FROM entry e ORDER BY e.user_id, e.id DESC) AS e ON e.user_id = u.id
GROUP BY u.id
ORDER BY u.user_rating DESC 
LIMIT 10;

EDIT:::
SELECT u.id, u.username, u.user_rating, u.avatar, u.created_at, e.id AS e_id, e.title 
FROM (SELECT u.id, u.username, u.user_rating, u.avatar, u.created_at FROM users u ORDER BY u.user_rating DESC LIMIT 10) AS u 
LEFT JOIN (SELECT e.id, e.user_id, e.title FROM entry e ORDER BY e.user_id, e.id DESC) AS e ON e.user_id = u.id
GROUP BY u.id;

