change to SQL
This commit is contained in:
parent
67c5550de6
commit
cc604420f3
|
@ -24,7 +24,7 @@ $mysqli = new mysqli($databaseAddress, $databaseUser, $databasePassword, $databa
|
||||||
$mysqli = new mysqli($databaseAddress, $databaseUser, $databasePassword, $databaseName);
|
$mysqli = new mysqli($databaseAddress, $databaseUser, $databasePassword, $databaseName);
|
||||||
|
|
||||||
function saveToDatabase($contentArray, $mysqli) {
|
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() {
|
function getFromDatabase() {
|
||||||
|
|
Loading…
Reference in New Issue