public function commit ()
{
- return XDB::execute('REPLACE INTO profile_medals
- VALUES ({?}, {?}, {?})',
+ return XDB::execute('INSERT INTO profile_medals (pid, mid, gid)
+ VALUES ({?}, {?}, {?})
+ ON DUPLICATE KEY UPDATE gid = VALUES(gid)',
$this->profile->id(), $this->mid,
is_null($this->gid) ? 0 : $this->gid);
}