function executeClassQuery($attributes, $selectMode) { switch ($selectMode) { case "className": echo "Search by Class Name<br>"; $attr = "CU.name"; break; case "repeatedOn": echo "Search by Repeat Day<br>"; $attr = "CU.repeatedOn"; break; case "instructor.name": echo "Search by Instructor Name<br>"; $attr = "T.Name"; break; } $tables = "class_uses CU, class_info CI, teaches T"; $queryString = "SELECT " . $attributes[0] . " FROM " . $tables . " WHERE " . $attr . " LIKE '%" . $_GET["select"] . "%'" . " AND CU.name = CI.name \n\t\t \tAND CU.activity_ID = T.activity_ID"; // echo $queryString . "<br>"; $result = executePlainSQL($queryString); printResultTable($result, "Classes", $attributes[1], $attributes[2]); }
?> </td> <td> <?php echo $w; ?> </td> </tr> </table> </div> <div class="row"> <div class="caption"> <div class="h4">Вероятность состояния системы</div> </div> <div class="limit"> <table class='table table-bordered'> <tr><th>Кол-во заявок</th><th>P<sub>k</sub></th></tr> <? printResultTable($resultArray); ?> </table> </div> </div> <div class="row"> <div class="col-xs-offset-6 col-xs-6"> <a href="index.php?id=input" class="btn btn-primary">Ввести другие данные</a> </div> </div> </div> <!-- график--> <div class="col-md-offset-1 col-md-5"> <canvas id="canvas" height="450" width="600"></canvas> <div class="h4">λ = <?php echo $lamda; ?>