SELECT H.*, U.surname as author, (SELECT COUNT(id) FROM sc_comments WHERE modul_id=H.id AND modul=:modul2 AND saved=:saved AND moderated=:moderated) as commentnum FROM sc_events as H LEFT JOIN sc_users U ON U.id=H.author WHERE (H.active=:active OR (H.active=:active2 AND date_scheduled<=:date_scheduled)) AND H.lang=:lang AND (date_start>=:date_start OR date_end>=:date_end) AND H.title IS NOT NULL ORDER BY H.date_start
Error!: SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared