MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
- by user198729
SELECT u.id AS u__id,
u.username AS u__username,
p.id AS p__id,
p.phonenumber AS p__phonenumber,
p.user_id AS p__user_id
FROM user u
INNER JOIN phonenumber p ON u.id = p.user_id
WHERE u.id IN (SELECT DISTINCT u2.id
FROM user u2
INNER JOIN phonenumber p2 ON u2.id = p2.user_id
LIMIT 20)
This query is from here:
http://www.doctrine-project.org/documentation/manual/1_2/en/dql-doctrine-query-language
It's supposed to work on all DBMS ,but not in fact