From e33960944fbf036f07e1e73e74ead7a685dea690 Mon Sep 17 00:00:00 2001 From: Ceda EI Date: Sun, 1 Jul 2018 16:18:10 +0530 Subject: [PATCH] Bugfix. --- webhook.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/webhook.php b/webhook.php index ef84e8f..a2c786f 100644 --- a/webhook.php +++ b/webhook.php @@ -123,14 +123,13 @@ function get_updated_req() { $sql = "SELECT name, quantity FROM req WHERE quantity > 0;"; $result = $conn->query($sql); + $text = ""; if ($result->num_rows > 0) { - $text = ""; while($row = $result->fetch_assoc()) { - $text .= $row["id"] . " " . $row["quantity"] . "\n"; + $text .= $row["name"] . " " . $row["quantity"] . "\n"; } - return $text; } else { - return "Everything is complete"; + $text = "Everything is complete"; } edit_html($text); }