Error in count items query! SELECT count(*) as itemNum FROM leonardo_flights WHERE (1=1) AND DATE_FORMAT(DATE,'%Y') = 2019 AND ( excludeFrom & 1 ) = 0 AND userID>0 AND (private=0 OR private=4 )