here here SELECT p.id ,p.stencil ,p.description ,p.price ,p.on_special ,p.size ,p.tnsizew ,p.tnsizeh ,p.details ,p.color_suggest ,pc.category_id FROM products p ,products_cat_horiz pc WHERE p.id = pc.product_id AND pc.category_id = 76 ORDER BY rank DESC ,ID