Reputation: 14404
I have a SQL query as follows
SELECT * FROM
epf_application
WHEREapplication_id
IN
(SELECTapplication_id
FROMepf_application_device_type
WHERE device_type_id IN
(SELECTdevice_type_id
FROMepf_device_type
WHEREname
="someDevice") LIMIT 30) LIMIT 30
When I run it in phpMyAdmin, I get the following error
1235 - This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
From the error, I am guessing that there is a problem with placing LIMIT
in a subquery. Any suggestions on how I can fix this?
Upvotes: 0
Views: 852
Reputation: 4901
SELECT
ea.*
FROM
epf_application ea JOIN epf_application_device ead
ON ead.application_id = ea.application_id
JOIN epf_device_type edt
ON edt.device_type_id = ead.device_type_id
WHERE
edt.name = 'someDevice'
LIMIT 30
Upvotes: 1