SELECT COUNT(DISTINCT(a.id)) as total FROM event a  LEFT JOIN event_date c on (c.event_id = a.id)  WHERE 1 AND DATE_FORMAT(c.date,'%Y-%m-%d')= DATE_FORMAT ('2019-06-24 14:25:55','%Y-%m-%d') AND a.online=1 AND a.date_online <= '2019-06-24 14:25:55'
FUNCTION lacid_www.DATE_FORMAT does not exist. Check the 'Function Name Parsing and Resolution' section in the Reference Manual