SELECT DISTINCT(id),path,file,date_available
       ,tn_ext,name,filesize,storage_category_id,average_rate
  FROM phpwebgallery2_images AS i
    INNER JOIN phpwebgallery2_image_category AS ic ON id=ic.image_id
  
    AND  category_id NOT IN (64,75,55,48,71,66,49,50,51,101,53,54,65,61,62,63,76,77,78,81,82,84,86,88,89,90,97,96,98,100,102,103,104,105,106,107,108,109,111,112,113,114,116,117,118,122,123,121,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,190,191,194,193,195,196,197,198,199,200,201,202,203,206,205,207,208,211,210,212,213,214,215,216,217,219,221,222,223,225,226,228,229,230,240,241,243,244,245,239,246,247,248,249,250,251,252,253,256,257,258,259,260,261,262,263,264,265,269,268,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288)
   ORDER BY hit DESC, file ASC
  LIMIT 48,-33
;
[mysql error 1064] 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 '-33' at line 8