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 (21,20,19,17,16,13,11,10,5,4,) ORDER BY MessageNumber DESC, ID DESC, MediaType ASC