commit | 2a26cd7112b62f6bf6f6ced047097a1476dc1248 | [log] [tgz] |
---|---|---|
author | Andreu <andreuhuguet@gmail.com> | Sun Sep 22 01:58:23 2019 +0200 |
committer | Andreu <andreuhuguet@gmail.com> | Sun Sep 22 01:58:23 2019 +0200 |
tree | b7577f82073ad8bd964ff99ff03fc678cba758f0 | |
parent | ef5af2da913038a08562b23cab8ec57681833d95 [diff] [blame] |
Relational algebra bug
diff --git a/php/utils.php b/php/utils.php index ae0cb5b..1e20ebf 100644 --- a/php/utils.php +++ b/php/utils.php
@@ -20,7 +20,7 @@ $conn->set_charset("utf8"); // Execute query and save result - $result = $conn->query($query); + if (!$result = $conn->query($query)) $result = $conn->error; // Close the connection $conn->close(); @@ -54,7 +54,7 @@ } $result->close(); } else { - die("Wrong query: " . $query); + die("Query failed: " . $query); } if ($id > 0) return $users[0];