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 (1,10,15,19,24,41,47,136,141,229,231,269,270,279,296,297,299,300,301,302,307,312,336,454,475,509,544,604,682,689,694,703,721,734,740,761,838,846,1079,1083,1090,1095,1157,1188,1191,1299,1365,1479,1491,1505,1513,1650,1693,1696,2260,2390,2391,2400,2412,2539,2545,2549,2559,2855,2940,2960,2971,2994,3000,3010,3011,3013,3032,3040,3047,3050,3158,3167,3179,3274,3343,3350,3659,3777,4071,4076,4081,4163,4168,4275,4293,4348,4379,4409,4415,4483,4557,4570,4572,4638,4675,4749,4849,5092,5105,5125,5235,5244,5266,5268,5469,5660,6077,6079,6382,6389,6394,6536,6607,6622,6898,6934,7038,7508,7557,7632,7650,7686,7761,8025,8045,8047,8052,8123,8124,8148,8174,8185,8226,8372,8436,8561,8600,8608,8750,8901,8902,8925,8970,9305,9752,9883,9884,9885,9886,9887,9925,9931,9961,9985,10113,10300,10569,10788,10924,12437,12525,12846,12877,12943,12988,13548,13550,13637,13792,14144,14587,15220,15239,15546,15630,15729,15755,16332,16405,16425,16427,16870,16925,16927,16944,16959,17023,17034,17452,17453,17555,17574,17577,17583,17597,18111,18449,18588,18963,) and agatti_films.active=1