Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2015
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.03 KB | None | 0 0
  1. <?php
  2.  
  3. $strQ = "SELECT Count(DenServRen.Description) as Total, Institute.Autokey as InKey
  4.        FROM StudentMain
  5.        LEFT JOIN EnrollmentMain ON StudentMain.StudentNo = EnrollmentMain.StudentNo
  6.        INNER JOIN CourseProgram ON EnrollmentMain.Coursekey = CourseProgram.Autokey
  7.        INNER JOIN Institute ON CourseProgram.Institutekey = Institute.Autokey
  8.        LEFT JOIN StudentDental ON StudentDental.Studentkey = StudentMain.Autokey
  9.        LEFT JOIN StudentDentalDetl ON StudentDentalDetl.Dentalkey = StudentDental.Autokey
  10.        LEFT JOIN DenServRen ON StudentDentalDetl.DenResult = DenServRen.Autokey
  11.        WHERE StudentDentalDetl.DentalDate is not null and DenServRen.Description = '$arrDisDental[$x]'and   Institute.Autokey = '$arrInstitute[$i]' Group by Institute.Autokey";
  12.  
  13.      $result = mySelectDB($strQ, $intHandle);
  14.          while($objResult = mysql_fetch_object($result)){
  15.                   $Total = $objResult->Total;
  16.           if($Total > 0){
  17.             echo "$Total";
  18.           }else{
  19.             echo "0";
  20.           }
  21.         }
  22.  
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement