SELECT calendar.*
FROM calendar
LEFT JOIN subscribes_fields
ON calendar.id_object = subscribes_fields.id_field
AND subscribes_fields.id_follower = 1
AND calendar.type = 'field'
LEFT JOIN subscribes_user_teams
ON calendar.id_object = subscribes_user_teams.id_team
AND subscribes_user_teams.id_follower = 1
AND calendar.type = 'team'
LEFT JOIN subscribes_events
ON calendar.id = subscribes_events.id_event
AND subscribes_events.id_follower = 1
AND subscribes_events.type = 'user'
WHERE ((subscribes_fields.id IS NOT NULL OR subscribes_fields.id_field IS NOT NULL)
OR (subscribes_user_teams.id IS NOT NULL OR subscribes_user_teams.id_team IS NOT NULL))
AND calendar.d_start = 17
AND calendar.m_start = 11
AND calendar.y_start = 2012