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 catid < 1) order by rand() limit 1' at line 1
/home/gympie/public_html/lib/class.banner.php 47
select * from sbtdb_banners where (isactive=1) and (catid= or catid < 1) order by rand() limit 1;