I am aware that mysql does not allow use of LIMIT with multiple table delete queries. I have looked for a solution online but I am not sure how to adapt them to my need. Here is the query which deletes all content that is not in the content, to keep table along with other conditions.
DELETE f
FROM field_data_body f
INNER JOIN node n
ON f.entity_id = n.nid
LEFT JOIN content_to_keep k
ON n.nid = k.nid
WHERE n.type = 'article'
AND k.nid IS NULL
So what options do I have to add a LIMIT param.
Edit:
Thanks for the help, but most answers are using the where in
clause. When I use it, I get an error saying "This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME"subquery'