</div> </nav> <!-- the table --> <div class="container"> <div class="row"> <div class="col-lg-12 col-md-12 col-xs-12"> <div class="jumbotron"> <!-- <div id="txtHint"><b>stuff</b></div> --> <div class="panel panel-default"> <table id="form" class="table-bordered"> <tr> <?php $startyear = $stustartyear; $endyear = $stustartyear + 4; $termWeAreCurrentlyIn = getCurrentTerm($startyear, $endyear); $termCounter = 1; ?> <th colspan="3"></th> <?php for ($x = 0; $x < 5; $x++) { ?> <th colspan="3"><center><?php echo $startyear + $x; ?> </center></th> <?php } ?> <th></th> </tr>
function getCourseInfoByCourseArray($courseArray) { $result = []; $term = getCurrentTerm(); if (sizeof($courseArray) > 0) { $sql = "SELECT * FROM (SELECT Classes.CourseNumber, Classes.Subject, Classes.Start_Time, Classes.End_Time, Classes.Days, Classes.RoomCap, Classes.Type, Classes.Section, Classes.Term, Courses.CourseTitle FROM Classes INNER JOIN Courses ON Classes.Subject = Courses.Subject AND Classes.CourseNumber = Courses.CourseNumber) AS p WHERE `TERM` = \"" . $term . "\" AND ( 0 "; // $sql = "SELECT * FROM Classes WHERE `TERM` = \"".$term."\" AND ( 0 "; foreach ($courseArray as $course) { $courseTemp = explode(" ", $course); if (count($courseTemp) < 2) { return; } // TODO: NEED TO HANDLE THIS $sql .= "OR (`Subject` = \"" . $courseTemp[0] . "\" AND " . "`CourseNumber` = \"" . $courseTemp[1] . "\") "; } $sql .= ")"; $queryResult = mysqli_query($this->mysqli, $sql); while ($row = mysqli_fetch_array($queryResult)) { $result[] = $row; } } return $result; }