SELECT product.*, product.id, assets.location as image_location, assets.orig_name as image_name, assets.extension as image_ext, tree.id as pages_tree_id, tree.seo_format_url AS seo_format_url FROM product INNER JOIN _rel_page_item ON _rel_page_item.item_id = product.id AND _rel_page_item.tree_type="product" INNER JOIN tree ON tree.id = _rel_page_item.tree_id AND tree.site_id = 185 LEFT JOIN assets on product.overview_image_id = assets.id WHERE product.old_id = 483 AND product.online = 1 ORDER BY _rel_page_item.prio