Some Mysql versions disallow 'limit' inside of a sub select.
My answer to you (and me in the future) would be to use groups
select firstName,Lastname,id
where {whatever}
group by id
having max(id)
This allows you to return whatever you want in the select area, without having an aggregate field.