An Error Was Encountered
Error Number: 1109
Unknown table 'ref' in where clause
SELECT offers.*, hotels.logo, hotels.pf_image, hotels.longname, ( SELECT `Name` FROM `offer_types` WHERE `offer_types`.`ID`=`offers`.`typeID` ) AS `type` FROM `offers` INNER JOIN `hotels` ON hotels.id=offers.hotel_id WHERE offers.id = ref.outcontrol AND hotels.online = 1