- XDB::execute('REPLACE INTO announce_photos
- SET eid = {?}, attachmime = {?}, x = {?}, y = {?}, attach = {?}',
- $eid, $type, $x, $y, $upload->getContents());
+ XDB::execute('INSERT INTO announce_photos (eid, attachmime, attach, x, y)
+ VALUES ({?}, {?}, {?}, {?}, {?})
+ ON DUPLICATE KEY UPDATE attachmime = VALUES(attachmime), attach = VALUES(attach), x = VALUES(x), y = VALUES(y)',
+ $eid, $type, $upload->getContents(), $x, $y);