Skip to content

Commit

Permalink
Order Alphabetically teachers
Browse files Browse the repository at this point in the history
  • Loading branch information
judemont committed May 16, 2024
1 parent 734a760 commit c6a3e8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/getTeachers.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
$searchQuery = $db->escapeStrings($_GET["searchQuery"]);

if(isset($searchQuery)){
$teachers = $db->select("SELECT * FROM cescoleaks_teachers WHERE name LIKE '%$searchQuery%'");
$teachers = $db->select("SELECT * FROM cescoleaks_teachers WHERE name LIKE '%$searchQuery%' ORDER BY name");
}else {
$teachers = $db->select("SELECT * FROM cescoleaks_teachers");
$teachers = $db->select("SELECT * FROM cescoleaks_teachers ORDER BY name");
}

foreach ($teachers as &$teacher) {
Expand Down

0 comments on commit c6a3e8f

Please sign in to comment.