SELECT
		IF (n.afbeelding<>'', n.afbeelding, nf.url) AS beeld
	FROM 
		tblNieuws AS n 
		LEFT JOIN MapNieuwsRubriek AS m 
		ON n.id=m.idNieuws 
		LEFT JOIN NieuwsRubriek AS r 
		ON m.idRubriek=r.id 
		LEFT JOIN tblNieuwsFotos AS nf ON n.id = nf.nieuws_id 
	WHERE 
		OLD_PASSWORD(n.id) ='foto's'
	GROUP BY 
		n.id 
	

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 's' GROUP BY n.id' at line 11