This is my query:
SELECT * FROM img_ref WHERE id_img = (SELECT `id_img` FROM img_ref WHERE `id_user`=4)
I'm trying to SELECT records from img_ref WHERE id_img = id_img attached to a specific id_user.
However, the subquery contains multiple rows/results and therefore throws the error "Subquery returns more than one row". How could I modify this statement so that the "WHERE id_img=" part and subquery allow multiple rows?
Thanks for your help in advance.