Select events.id as event_id,events.title as event_title,events.typeastype,events.event_type as event_type,
events.timeas event_time,events.description as event_description, events.visibility as event_visibility, events.picture as event_picture,
events.business_id as event_business_id, events.max_people as event_max_people, events.admin_id as event_admin_id, attendees.id as attendee_id,
attendees.event_id as attendees_event_id, attendees.user_id as attendees_user_id, attendees.confirmed as attendees_confirmed,profiles.id as profile_id,
profiles.name as user_name, profiles.gender as gender,profiles.number as user_number, profiles.city as user_city,
profiles.country as user_country,profiles.photo as user_photo,profiles.user_id as user_id,guests.id as guest_id,
guests.event_id as guests_event_id, guests.number as guest_number, offers.id as offer_id, offers.title as offer_title,
offers.start_time as offer_start_time, offers.end_time as offer_end_time, offers.discount_percentage as offer_discount_percentage,
offers.discount_amount as offer_discount_amount, offers.additional as offer_additional,offers.description as offer_description,
offers.event_id as offer_event_id, offers.picture as offer_picture,offers.is_limited as offer_is_limited, offers.users as offer_users,
offers.criteria as offer_criteria, offers.coupon_required as offer_coupon_required,offers.typeas offer_type,
offers.expired as offer_expired,offers.business_id as offer_business_id, businesses.id as business_id,
businesses.name as business_name, businesses.areaas business_area, businesses.address as business_address,
businesses.city as business_city, businesses.country as business_country,businesses.latitude as business_latitude,
businesses.longitude as business_longitude, businesses.postcode as business_postcode, businesses.category as business_category,
businesses.phone as business_phone, businesses.timing as business_timing,businesses.owner_id as business_owner_id,6371*