Query failed:
Query = "SELECT sport_events.id as sportId,event_details.id as eventDetailId,addresses.countryId FROM sport_events JOIN events ON events.sportEventId = sport_events.id AND events.deleted != 'Y' JOIN event_details ON event_details.eventId = events.id AND event_details.deleted != 'Y' AND event_details.publish = 'Y' AND entryCloseDateTimestamp < 1397835541 JOIN addresses ON addresses.id = event_details.addressId AND addresses.deleted != 'Y' WHERE sport_events.deleted != 'Y' AND parentId = 0"
Error message = "Column 'parentId' in where clause is ambiguous"