
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.

You can have a look at http://new.hadithbd.com/hadith/filter/?hadith=12&book=22
login detail in private