Originally Said By: Ray Borduin

This is beyond the scope of what I can do in the forums. I'm not even sure where you are stuck. If you have a specific question then I can try to answer it, but if you want me to build your application for you, we would need to schedule a premier support ticket.

Dear Ray, I got your point. I am actually stuck on a position where all the BookID should split from $filterHadithBooks query and loop through one after another for filtering the data from $mainHadith query. With the below query I can see that only one file is generating in output.
<?php
$filterHadithBooks = new WA_MySQLi_RS("filterHadithBooks",$hadithbd,0);
$filterHadithBooks->setQuery("SELECT hadithbook.BookID FROM hadithbook WHERE hadithbook.Active = 1 ORDER BY hadithbook.priority ASC");
$filterHadithBooks->execute();
?>
<?php
while (!$filterHadithBooks->atEnd()) {
?>
<?php
$mainHadith = new WA_MySQLi_RS("mainHadith",$hadithbd,0);
$mainHadith->setQuery("SELECT hadithmain.HadithID AS hadithID, hadithmain.HadithNo AS hadithNumber, hadithmain.hadithNo2 AS hadithNumber2, hadithmain.hadithNo3 AS hadithNumber3, hadithmain.ArabicHadith AS arabicHadithTashkeel, hadithmain.ArabicHadithNew AS arabicHadithNoTashkeel, hadithmain.BanglaHadith AS banglaHadith, hadithmain.EnglishHadith AS englishHadith, hadithmain.HadithNote, hadithbook.BookNameBD AS bookNameBangla, hadithchapter.ChapterBG AS hadithChapterBangla, hadithchapter.ChapterAR AS hadithChapterArabic, hadithchapter.ChapterEN AS hadithChapterEnglish, hadithexplanation.explanation AS hadithExplanation, hadithlearning.hadithinfo AS learningFromHadith, hadithstatus.StatusID, hadithstatus.StatusBG, rabihadith.rabiBangla, hadithsection.SectionBD FROM hadithmain LEFT OUTER JOIN hadithbook ON hadithmain.BookID = hadithbook.BookID LEFT OUTER JOIN hadithchapter ON hadithmain.chapterID = hadithchapter.chapID LEFT OUTER JOIN hadithexplanation ON hadithmain.HadithID = hadithexplanation.hadithID LEFT OUTER JOIN hadithlearning ON hadithmain.HadithID = hadithlearning.hadithID LEFT OUTER JOIN hadithstatus ON hadithmain.HadithStatus = hadithstatus.StatusID LEFT OUTER JOIN rabihadith ON hadithmain.RabiID = rabihadith.rabiID LEFT OUTER JOIN hadithsection ON hadithmain.SectionID = hadithsection.SectionID WHERE hadithmain.HadithActive = 1 AND hadithmain.BookID = ? ORDER BY hadithmain.HadithNo ASC");
$mainHadith->bindParam("i", "".($filterHadithBooks->getColumnVal("BookID")) ."", "-1"); //WAQB_Param1
$mainHadith->execute();
?>
<?php
$filterHadithBooks->Results[$filterHadithBooks->Index];
$filterHadithBooks->moveNext();
}
?>