From 6ff038c87029cc94549de813b4e2ccf1d7266134 Mon Sep 17 00:00:00 2001 From: Manuel Kamper Date: Sat, 24 Jun 2023 13:44:41 +0000 Subject: [PATCH] =?UTF-8?q?=E2=80=9Eindex.php=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 3304e1a..a82b96f 100644 --- a/index.php +++ b/index.php @@ -41,7 +41,8 @@ if ($result->num_rows > 0 && $result2->num_rows >0 && $result3->num_rows && $res $row4 = $result4->fetch_assoc(); $saved_lifetime = round(($row["lifetime"] / 1000) * $price,2); $saved_year = round(($row["year"] / 1000) * $price,2); - $jsonres = array("today"=>$row["today"], "yesterday"=>$row4["today"], "week"=>$row2["week"], "last_week"=>$row3["week"], "month"=>$row["month"], "year"=>$row["year"], "lifetime"=>$row["lifetime"], "current"=>$row["current"], "saved_lifetime"=>$saved_lifetime, "saved_year"=>$saved_year, "last_update"=>$row["last_update"]); + $saved = round(($row["today"] / 1000) * $price,2); + $jsonres = array("today"=>$row["today"], "yesterday"=>$row4["today"], "week"=>$row2["week"], "last_week"=>$row3["week"], "month"=>$row["month"], "year"=>$row["year"], "lifetime"=>$row["lifetime"], "current"=>$row["current"], "saved"=>$saved, "saved_lifetime"=>$saved_lifetime, "saved_year"=>$saved_year, "last_update"=>$row["last_update"]); } } else { $jsonres = array("Error"=>"No result from database.");