Try:
HAVING hadithmain.BookID = ? ORDER BY hadithmain.HadithNo ASC");
$mainHadith->bindParam("il", "".(isset($_GET['hadith'])?$_GET['hadith']:"") ."", "-1"); //WAQB_Param1
adding the "l" to the parameter tell it that you are passing an "integer list" and not a single integer.