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 topic2= or topic3= or topic4= or topic5= or topic6= or topic7= or topic8= or ' at line 3
SELECT distinct(agatti_films.id), agatti_films.name,agatti_films.u_name as f_u_name, agatti_films.year, agatti_people.name as the_person, agatti_people.id as the_person_id, agatti_people.u_name as the_person_u_name FROM agatti_films, agatti_people where (topic1= or topic2= or topic3= or topic4= or topic5= or topic6= or topic7= or topic8= or topic9= or topic10=) and agatti_people.id = agatti_films.co_director0 and agatti_films.active=1 order by agatti_films.alpha_name asc limit 0, 25