SELECT * FROM `image_appreciations`
WHERE `image_id` IN(SELECT `id` FROM `images` WHERE `user_id` = '1')
Is my current query, it returns zero results
SELECT `id` FROM `images` WHERE `user_id` = '1'
being the subquery returns around 8 id’s which two of them are found in
SELECT * FROM `image_appreciations`
WHERE `image_id` IN(77,89)
And that works fine. But all together it fails. What am i doing wrong?
This could be done using
JOIN. Below is an example using the implicit short-hand syntax.