From 854d7680c8a5ef7b41554360c043dcca29161651 Mon Sep 17 00:00:00 2001 From: Paul van Schayck Date: Sat, 8 Jan 2005 18:21:34 +0000 Subject: [PATCH] Fix query for inserting score for fake version, should insert row instead of update row if row doesn't already exist. --- include/rating.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rating.php b/include/rating.php index d9cbafa..acd0944 100644 --- a/include/rating.php +++ b/include/rating.php @@ -210,7 +210,7 @@ function rating_update($vars) 'userId' => $userId, 'system' => 'fake', 'score' => $score_f)); - query_appdb("UPDATE appVersion SET rating_windows = $r->rating WHERE versionId = $versionId"); + query_appdb("INSERT INTO appRating ({$aInsert['FIELDS']}) VALUES ({$aInsert['VALUES']})"); } $r = rating_for_version($versionId, "fake");