Vote: Use REPLACE INTO instead of INSERT IGNORE INTO (#1145)

* Vote: Use REPLACE INTO instead INSERT IGNORE INTO

* Update CHANGELOG.md
This commit is contained in:
Roman Kelesidis 2023-11-21 08:14:57 +07:00 committed by GitHub
commit b78b303c4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -32,8 +32,7 @@ switch ($mode) {
$columns = 'topic_id, user_id, time';
$values = "$topic_id, {$userdata['user_id']}, " . TIMENOW;
DB()->query('INSERT IGNORE INTO ' . BB_THX . " ($columns) VALUES ($values)");
DB()->query('REPLACE INTO ' . BB_THX . " ($columns) VALUES ($values)");
$this->response['html'] = '<b>' . profile_url($userdata) . ' <i>(' . bb_date(TIMENOW) . ')</i></b>';
break;