INSERT INTO ON DUPLICATE KEY UPDATE
作者:互联网
// insert
_inUpsSQL = "INSERT INTO %s (mid,nickname,account_type,category_id,fans,account_state,sign_type,apply_at,%s,is_deleted) VALUES (?,?,?,?,?,?,?,?,?,?) ON DUPLICATE KEY UPDATE nickname=?,account_type=?,category_id=?,fans=?,account_state=?,sign_type=?,apply_at=?,%s=?,is_deleted=?"
_inUpBgmSQL = "INSERT INTO up_info_bgm(mid,nickname,bgms,account_type,fans,account_state,sign_type,signed_at,is_deleted) VALUES(?,?,?,?,?,3,?,?,0) ON DUPLICATE KEY UPDATE nickname=VALUES(nickname),bgms=VALUES(bgms),account_type=VALUES(account_type),fans=VALUES(fans),account_state=3,signed_at=VALUES(signed_at),sign_type=VALUES(sign_type),is_deleted=0"
_inCreditRecordSQL = "INSERT INTO credit_score_record (mid,operate_at,operator,reason,deducted,remaining) VALUES(?,?,?,?,?,?)"
_inCreditScoreSQL = "INSERT INTO credit_score(mid) VALUES(?) ON DUPLICATE KEY UPDATE mid=VALUES(mid)"
标签:INSERT,account,fans,INTO,mid,sign,DUPLICATE,VALUES,type 来源: https://www.cnblogs.com/rsapaper/p/14868823.html