QUERY = SELECT CubeCart_cats_idx.cat_id, CubeCart_cats_idx.productId, productCode, quantity, description, image, price, name, popularity, sale_price, stock_level, useStockLevel, if(sale_price>0,sale_price,price) as sellingprice FROM CubeCart_cats_idx INNER JOIN CubeCart_inventory ON CubeCart_cats_idx.productId = CubeCart_inventory.productId WHERE hidden!='yes' and hidden_cat!='yes' and CubeCart_cats_idx.cat_id = '9'ORDER by sellingprice ASC