SELECT *, IF(PRODUCTS.SPECIAL='1',PRODUCTS.PRODUCT_SALE_PRICE,PRODUCTS.PRODUCT_REG_PRICE) as price FROM `PRODUCT_BRIDGE`,`PRODUCTS` WHERE (PRODUCT_BRIDGE.CATEGORY_ID='1114' OR PRODUCT_BRIDGE.CATEGORY_ID='1078' OR PRODUCT_BRIDGE.CATEGORY_ID='1080' OR PRODUCT_BRIDGE.CATEGORY_ID='1081' OR PRODUCT_BRIDGE.CATEGORY_ID='1082' OR PRODUCT_BRIDGE.CATEGORY_ID='1083' OR PRODUCT_BRIDGE.CATEGORY_ID='1084' OR PRODUCT_BRIDGE.CATEGORY_ID='1085' OR PRODUCT_BRIDGE.CATEGORY_ID='1086' OR PRODUCT_BRIDGE.CATEGORY_ID='1087' OR PRODUCT_BRIDGE.CATEGORY_ID='1088' OR PRODUCT_BRIDGE.CATEGORY_ID='1090' OR PRODUCT_BRIDGE.CATEGORY_ID='1091' OR PRODUCT_BRIDGE.CATEGORY_ID='1092' OR PRODUCT_BRIDGE.CATEGORY_ID='1094' OR PRODUCT_BRIDGE.CATEGORY_ID='1096' OR PRODUCT_BRIDGE.CATEGORY_ID='1098' OR PRODUCT_BRIDGE.CATEGORY_ID='1099' OR PRODUCT_BRIDGE.CATEGORY_ID='1101' OR PRODUCT_BRIDGE.CATEGORY_ID='1102' OR PRODUCT_BRIDGE.CATEGORY_ID='1103' OR PRODUCT_BRIDGE.CATEGORY_ID='1104' OR PRODUCT_BRIDGE.CATEGORY_ID='1108') AND PRODUCT_BRIDGE.PRODUCT_ID=PRODUCTS.PRODUCT_ID AND PRODUCTS.PRODUCT_ACTIVE='1' AND PRODUCTS.DISCONTINUED='' and PRODUCTS.ISDELETED='0' GROUP BY PRODUCTS.PRODUCT_ID ORDER BY `price` ASC,PRODUCTS.PRODUCT_NAME, PRODUCT_ACTIVE DESC