From cc604420f3fb05082eb98e2698d16c94c93eb2d8 Mon Sep 17 00:00:00 2001 From: schrom01 Date: Wed, 15 Feb 2023 13:32:50 +0100 Subject: [PATCH] change to SQL --- dataCollector/dataCollector.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dataCollector/dataCollector.php b/dataCollector/dataCollector.php index 8963c64..c7ab293 100644 --- a/dataCollector/dataCollector.php +++ b/dataCollector/dataCollector.php @@ -24,7 +24,7 @@ $mysqli = new mysqli($databaseAddress, $databaseUser, $databasePassword, $databa $mysqli = new mysqli($databaseAddress, $databaseUser, $databasePassword, $databaseName); function saveToDatabase($contentArray, $mysqli) { - $mysqli->query("INSERT INTO `u517357132_genderwatchpro` (`id`, `fullJSON`, `timeWatchM`,`timeWatchW`, `timeWatchD`, `countWatchM`, `countWatchW`, `countWatchD`) values ($contentArray[0], $contentArray[2], $contentArray[3], $contentArray[4], $contentArray[5], $contentArray[6], $contentArray[7], $contentArray[8]) ON DUPLICATE KEY UPDATE `id` = $contentArray[0]"); + $mysqli->query("INSERT INTO `topics` (`id`, `fullJSON`, `timeWatchM`,`timeWatchW`, `timeWatchD`, `countWatchM`, `countWatchW`, `countWatchD`) values ($contentArray[0], $contentArray[2], $contentArray[3], $contentArray[4], $contentArray[5], $contentArray[6], $contentArray[7], $contentArray[8]) ON DUPLICATE KEY UPDATE `id` = $contentArray[0]"); } function getFromDatabase() {