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 'SELE kCT id, path FROM pages WHERE locked=1 OR searchable=0 OR type='search' OR ' at line 1
SELE kCT id, path FROM pages WHERE locked=1 OR searchable=0 OR type='search' OR user_group!='0'