Could not successfully run query (select
distinct products.product_id
from products
left outer join x_grade on products.product_id = x_grade.products inner join grade on x_grade.grade = grade.id
left outer join x_color on products.product_id = x_color.products inner join color on x_color.color = color.id
left outer join x_size on products.product_id = x_size.products inner join size on x_size.size = size.id
left outer join x_shape on products.product_id = x_shape.products inner join shape on x_shape.shape = shape.id
left outer join sort on products.sort = sort.id
left outer join type on products.type = type.id
left outer join price_range on products.price_range = price_range.id
left outer join photos on products.product_id = photos.product_id where photos.main = 'Y' and products.promotion <> 'Y' and sort.id in (7,8) and metal.id = 3 order by products.create_date DESC, products.set_seq ASC, products.item_no DESC, photos.photo_id ASC ) from DB: Unknown column 'metal.id' in 'where clause'
