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 ') ) OR ( homepage_slideshow.Visibile = 0 AND homepage_...' at line 12