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 (rootcatid=)) AND (parentid=0) AND (status='published') ORDER BY time_publi' at line 1
querry:SELECT id, intro, title, kw, catid, parentid, time_publish, mainphoto FROM che_content WHERE (ctype='article') AND (time_publish<1337381145) AND ((catid=) OR (rootcatid=)) AND (parentid=0) AND (status='published') ORDER BY time_publish+id DESC LIMIT 0,30