Bugfix.
This commit is contained in:
parent
08bc8d02a6
commit
e33960944f
|
@ -123,14 +123,13 @@ function get_updated_req() {
|
||||||
$sql = "SELECT name, quantity FROM req WHERE quantity > 0;";
|
$sql = "SELECT name, quantity FROM req WHERE quantity > 0;";
|
||||||
$result = $conn->query($sql);
|
$result = $conn->query($sql);
|
||||||
|
|
||||||
if ($result->num_rows > 0) {
|
|
||||||
$text = "";
|
$text = "";
|
||||||
|
if ($result->num_rows > 0) {
|
||||||
while($row = $result->fetch_assoc()) {
|
while($row = $result->fetch_assoc()) {
|
||||||
$text .= $row["id"] . " " . $row["quantity"] . "\n";
|
$text .= $row["name"] . " " . $row["quantity"] . "\n";
|
||||||
}
|
}
|
||||||
return $text;
|
|
||||||
} else {
|
} else {
|
||||||
return "Everything is complete";
|
$text = "Everything is complete";
|
||||||
}
|
}
|
||||||
edit_html($text);
|
edit_html($text);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue