SQL error (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 'and+topics.topic_id%3Dfavorites.article_id+and+ip%3D%27%27
group by topics.topi' at line 5)in (

select topics.topic_id
from topics ,favorites
where access=1 and (((expires and expires>=curdate()) or not expires) and
((since and since<=curdate()) or not since))
+and+topics.topic_id%3Dfavorites.article_id+and+ip%3D%27%27
group by topics.topic_id

) SQL error (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 'and+topics.topic_id%3Dfavorites.article_id+and+ip%3D%27%27
group by topics.topi' at line 6)in (

select topics.topic_id,subject,left(body,255),short_content,body,
(match(body,subject) against ('')) as score,topics.icon
from topics ,favorites
where access=1 and (((expires and expires>=curdate()) or not expires) and
((since and since<=curdate()) or not since))
+and+topics.topic_id%3Dfavorites.article_id+and+ip%3D%27%27
group by topics.topic_id
order by score desc,topics.sort asc,topics.subject asc
limit 10,10