Cannot execute query: SELECT * FROM furniture.pics RIGHT JOIN (SELECT * FROM furniture.listings where category = 2) as l on l.id = furniture.pics.id