Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $strQ = "SELECT Count(DenServRen.Description) as Total, Institute.Autokey as InKey
- FROM StudentMain
- LEFT JOIN EnrollmentMain ON StudentMain.StudentNo = EnrollmentMain.StudentNo
- INNER JOIN CourseProgram ON EnrollmentMain.Coursekey = CourseProgram.Autokey
- INNER JOIN Institute ON CourseProgram.Institutekey = Institute.Autokey
- LEFT JOIN StudentDental ON StudentDental.Studentkey = StudentMain.Autokey
- LEFT JOIN StudentDentalDetl ON StudentDentalDetl.Dentalkey = StudentDental.Autokey
- LEFT JOIN DenServRen ON StudentDentalDetl.DenResult = DenServRen.Autokey
- WHERE StudentDentalDetl.DentalDate is not null and DenServRen.Description = '$arrDisDental[$x]'and Institute.Autokey = '$arrInstitute[$i]' Group by Institute.Autokey";
- $result = mySelectDB($strQ, $intHandle);
- while($objResult = mysql_fetch_object($result)){
- $Total = $objResult->Total;
- if($Total > 0){
- echo "$Total";
- }else{
- echo "0";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement