You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'or pd.caDocentenId_Lotus=) and pd.datum='2012-1-1' and p.id=pd.caProjectenId and' at line 13