SHARE
TWEET

Untitled

a guest Jun 24th, 2019 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. NAME   ROLL NO   SUB1   SUB2    SUB3  TOTAL  RESULT  POSITION RANK
  2. RAM     0054     65     54      64     183     PASS    FIRST    2
  3. HAri    0054     65     54      65     184     PASS    FIRST    1
  4. gopal   0054     65     50      65     180     PASS    FIRST    3
  5. saroj   0054     65     44      65     174     PASS    FIRST    4
  6.  
  7. BUT WITH THE FOLLOWING CODE  
  8.  
  9. <table width="400" border="1">
  10. <thead>
  11.     <tr>
  12.       <!-- -->
  13.     </tr>
  14.  
  15. </thead>
  16.  
  17.  
  18.  <tbody>
  19.  <?php
  20.  
  21.  
  22. $query = "SELECT * FROM Marksheet_student
  23.  JOIN `class` ON   `Marksheet_student`.`class_id` = `class`.`class_id`
  24. JOIN `student`  ON   `Marksheet_student`.`student_id`=`student`.`student_id`
  25. JOIN `section`  ON   `Marksheet_student`.`section_id`=`section`.`section_id`
  26. JOIN `subjects` ON   `Marksheet_student`.`subject_id`=`subjects`.`subject_id` ";
  27.  
  28. $select_result = mysqli_query($db_con, $query);
  29.  
  30. if (!$select_result) {
  31.     die("no result" . mysqli_error($db_con));
  32. }
  33.  
  34.  
  35. while ($row = mysqli_fetch_array($select_result)) {
  36.      $student_name = $row['firstname'];
  37.     $subject_name = $row['name'];
  38.      $first_CA = $row['first_CA'];
  39.      $second_CA = $row['second_CA'];
  40.      $exams = $row['exams'];
  41.       $class_name = $row['class_name'];
  42.        $section_name = $row['section_name'];
  43.  
  44.      echo "<tr>";
  45.      echo "<td> $student_name </td>";
  46.      echo "<td> $subject_name </td>";
  47.       echo "<td> $first_CA </tr>";
  48.        echo "<td> $second_CA </tr>";
  49.         echo "<td> $exams </tr>";
  50.          echo "<td> $class_name </tr>";
  51.           echo "<td> $section_name </tr>";
  52.     echo "</tr>";
  53. }
  54.  
  55.  
  56.  
  57. ?>
  58.  
  59.  
  60. </tbody>
  61. </table>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top