SELECT * , (select `name` from `locations` where `locations`.`id` = `offers`.`location` ) as `location_name` FROM `offers` where `id` = %5Bloopvalue%5Bid%5D%5D