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 ') ORDER BY MessageNumber DESC, ID DESC, MediaType ASC' at line 1 SELECT ID,SubjectKeywords,MessageNumber,Type,Title,Speaker,MessageDate,Summary,MediaType,CD,DVD,Digitized FROM messageinfo where MediaType in ('CD','DVD') and MessageNumber in (1004,1003,1002,1001,1000,100,10,) ORDER BY MessageNumber DESC, ID DESC, MediaType ASC