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 'WHERE index_id= and version='published'' at line 1 line: 94
SELECT * FROM WHERE index_id= and version='published'