Fix query for inserting score for fake version, should insert row
instead of update row if row doesn't already exist.
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user