commit b04e4aa8391cfa9401da9cc8683ef8ad4f7457ad
parent 0363fed8451788460c42f85715232a5386c148a1
Author: LennartSchroot <[email protected]>
Date: Thu, 29 Jun 2023 16:39:42 +0200
country
Diffstat:
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/Controller/api/api.php b/Controller/api/api.php
@@ -3,15 +3,16 @@
function storeZooData($dataArray): void{
if ($dataArray)
$db = new mysqli("86.92.67.21", "friedel", "hailiwa", "panda");
- $query = "INSERT INTO retrieve_zoos (city, wind_chill, date) VALUES (?, ?, ?)";
+ $query = "INSERT INTO retrieve_zoos (city, wind_chill, date, country) VALUES (?, ?, ?, ?)";
$stmt = mysqli_prepare($db, $query);
foreach ($dataArray as $data) {
$city = $data->city;
$windchill = $data->windchill;
$date = $data->date;
+ $country = $data->country;
- $stmt->bind_param("sds", $city, $windchill, $date);
+ $stmt->bind_param("sdss", $city, $windchill, $date, $country);
$stmt->execute();
}