You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 7
SELECT * FROM tblmisljenjepodrucje pp LEFT JOIN tblpodrucje1 p1 on pp.Podrucje1ID=p1.IDPodrucje1 LEFT JOIN tblpodrucje2 p2 on pp.Podrucje2ID=p2.IDPodrucje2 LEFT JOIN tblpodrucje3 p3 on pp.Podrucje3ID=p3.IDPodrucje3 LEFT JOIN tblpodrucje4 p4 on pp.Podrucje4ID=p4.IDPodrucje4 WHERE pp.MisljenjeID=