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 '-20,20' at line 1 in SELECT * FROM other_ads WHERE id NOT IN ('1191','1190','1193','1194','1195','1196','1197','1198','1199','1201','1202','1203','1204','1205','3008','3209','4666','5253','5309','5396','5471','5523','5932','6472','6479','6610','6631','6712','6899','7244','7497','7495','7496','7494','7498','7499','7501','7502','7503','7504','7505','7506','7507','7508','7509','7510','7511','7513','7516','7521','7523','7524','7525','7526','7527','7528','7529','7530','7531','7532','7533','7534','7535','7537','7538','7539','7540','7542','7543','7544','7545','7546','7547','7548','7549','7550','7551','7552','7553','7554','7557','7558','7559','7560','7561','7562','7563','7564','7566','7567','7568','7569','7570','7571','7572','7573','7574','7575','7576','7577','7578','7579','7580','7581','7582','7583','7584','7585','7586','7587','7588','7590','7591','7592','7593','7594','7595','7596','7597','7598','7599','7600','7601','7602','7604','7605','7606','7607','7608','7609','7611','7612','7613','7615','7616','7617','7618','7619','7620','7621','7622','7623','7624','7625','7626','7627','7628','7629','7630','7631','7632','7633','7634','7635','7636','7637','7638','7639','7640','7641','7642','7643','7644','7645','7648','7650','7651','7652','7653','7657','7662') ORDER BY vip1 DESC, id DESC LIMIT -20,20