Skip to content

Commit 2602fc7

Browse files
authored
Fixes two broken db references.
Fixes two broken db references.
2 parents d2eed9a + f207781 commit 2602fc7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

api/entity.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@
9898
AND number IS NOT NULL
9999
ORDER BY id";
100100
}
101-
$result = $db->query($query);
101+
$result = $dbConn->query($query);
102102
if(!$result) {
103-
die(json_encode(array("error" => "mysql", "msg" => $db->error)));
103+
die(json_encode(array("error" => "mysql", "msg" => $dbConn->error)));
104104
}
105105

106106
// Collect the departments and turn it into a json

inc/databaseConn.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function getCourse($term, $dept, $courseNum, $sectNum) {
184184
// Execute the query and error check
185185
$result = $dbConn->query($query);
186186
if(!$result) {
187-
throw new Exception("mysql:" . $db->error);
187+
throw new Exception("mysql:" . $dbConn->error);
188188
} elseif($result->num_rows > 1) {
189189
throw new Exception("ambiguous:{$term}-{$dept}-{$courseNum}-{$sectNum}");
190190
} elseif($result->num_rows == 0) {

0 commit comments

Comments
 (0)