From fde10ee7bffa2f57b384bf5ba2f5d9f1723082cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Fri, 15 Dec 2017 17:22:43 +0100 Subject: [PATCH] fixed statslog override --- www/protected/controllers/ApiController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/www/protected/controllers/ApiController.php b/www/protected/controllers/ApiController.php index 78f236d..a4b3630 100644 --- a/www/protected/controllers/ApiController.php +++ b/www/protected/controllers/ApiController.php @@ -78,7 +78,7 @@ class APIController extends MSController { $connection = Yii::app()->db; - $command=$connection->createCommand("REPLACE INTO {{an_statslog}} (ClientID, Version, ProviderStr, ProviderID, NoteCount) VALUES (:cid, :v, :pstr, :pid, :nc)"); + $command=$connection->createCommand("INSERT INTO {{an_statslog}} (ClientID, Version, ProviderStr, ProviderID, NoteCount) VALUES (:cid, :v, :pstr, :pid, :nc) ON DUPLICATE KEY UPDATE Version=:v,ProviderStr=:pstr,ProviderID=:pid,NoteCount=:nc"); $command->bindValues([ ':cid' => $_GET['ClientID'], ':v' => $_GET['Version'],