select id from natjecaji where rok < now() and rok > '1980-01-01' and 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 '' at line 1