SELECT 
						`events`.*,
						`pictures`.`thumbnail`,
						(CASE WHEN
							`events`.`event_date_to` != '0000-00-00 00:00:00'
							AND `events`.`event_date_to` != ''
							AND `events`.`event_date_to` is not null
								THEN 
									CONCAT(
										DATE_FORMAT(`events`.`event_date_from`, '%Y. %m. %d.'),
										' - ',
										DATE_FORMAT(`events`.`event_date_to`, '%Y. %m. %d.')
									)
								ELSE DATE_FORMAT(`events`.`event_date_from`, '%Y. %m. %d. %H:%i')
						END) as `date_formatted`,
						CONCAT(Seo_Url(`event_title`), '/', `events`.`id`) as `seo_name`
					FROM
						`events`
					LEFT JOIN
						`pictures`
						ON `pictures`.`table`='events' AND `item_id`=`events`.`id` AND `default_pic`=1
					WHERE
							 `language`="1" AND `active`=1
					ORDER BY
						`event_date_from` DESC LIMIT -10,10