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 agatti_films.active=1' at line 1
select agatti_films.genre1,agatti_films.genre2,agatti_films.genre3,agatti_films.genre4,agatti_films.genre5,agatti_films.genre6,agatti_films.genre7,agatti_films.genre8,agatti_films.genre9,agatti_films.genre10 from agatti_films where id in (36,180,184,307,349,354,443,475,509,600,665,680,684,691,697,712,778,801,805,845,846,1079,1083,1088,1096,1159,1194,1479,1492,1496,1921,2069,2073,2077,2176,2207,2400,2401,2537,2543,2927,2937,2957,2960,2966,2975,2979,3044,3061,3159,3436,3759,3760,3778,4347,4420,4522,4613,4638,5114,5221,5262,5268,5321,5611,5660,6087,6149,6172,6317,6322,6357,6647,6863,7007,7623,7700,7760,7905,7906,7967,8069,8153,8160,8185,8356,8607,8910,8912,9415,9571,9821,9871,9985,10000,10717,10927,11040,11303,11356,11505,12322,12988,13120,13939,14581,14584,14808,14889,15110,15500,15503,16138,16424,16457,16462,17031,17032,17571,17574,17597,18090,18654,19130,19147,19148,19149,19404,19466,19631,20412,20413,21065,22198,22218,22237,22248,22312,22404,22477,22559,22706,22723,22732,22788,22945,23077,23084,23128,23203,23700,23902,23934,23997,24044,24045,24384,24433,24512,24551,24600,24603,24620,24633,24674,24680,24685,24884,24906,24914,24917,25118,25120,25127,25357,25367,25383,25387,25984,26073,26708,27217,27422,27667,27785,28108,28122,28141,28915,29093,) and agatti_films.active=1