Php | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Php

function studentSectionAvailableList($studentId, $currentSemester) { global $conn; $sql="SELECT s.section_id, c.course_code, c.course_name, s.section_number". "FROM Section s, Course c ". "WHERE s.section_id NOT IN ( SELECT s.section_id ". "FROM Student_Section ss, Section s ". " WHERE ss.section_id = s.section_id ". " AND ss.student_id = 's001')". AND s.course_code IN ( "SELECT s.course_code ". "FROM Student_Section ss, Section s ". " WHERE ss.section_id = s.section_id". " AND ss.student_id = 's001')". "AND s.course_code = c.course_code". "AND s.semester_id = 53"; $result = mysqli_query($conn,$sql) or die("Error in query: $query". mysqli_error($conn)); while(($section = mysqli_fetch_assoc($result))) { $sid = $section['section_id']; $cc = $section['course_code']; $cn = $section['course_name']; $sn = $section['section_number']; echo "<option value='$sid'>$cc - $cn (# $sn)</option>"; }

12th Apr 2021, 7:35 PM
Ahmed
Ahmed - avatar
4 Answers
+ 1
Use html instead of PHP
13th Apr 2021, 3:31 AM
Shardul
Shardul - avatar
0
Ahmed thanks!
13th Apr 2021, 4:45 AM
Shardul
Shardul - avatar
0
Hi can i ask? Which of the following is the correct syntax for a while statement? can you provide your stand of choice. a. while ($1 <= 5, ++$i){ $echo "<p>I</p>"; } b. while ($i <= 5){ $echo "<p>$i</p>"; ++$i; } c. while ($i <= 5){ $echo "<p>$i</p>"; ++$i: } d. while ($i <= 5; echo "<p>$i</p>"); ++$i; }
22nd Apr 2021, 5:46 AM
andeng