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