You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'of
inner join #__hotelreservation_offers_vouchers hov on of.offer_id = ' at line 1 SQL=select * from #__hotelreservation_offers of
inner join #__hotelreservation_offers_vouchers hov on of.offer_id = hov.offerId
where REPLACE(hov.voucher,'-',' ') = 'our hotel'
group by of.offer_id LIMIT 0, 1