MYSQL篇 新增如果unique索引字段重复,则更新: insert into mg_user(key,key2,key3)value('value','value2','value3') on duplicate key update key=value,key2=value2,key3=value3 show global variables: if(!mysql_real_connect(&logdb, my_hostname, my_user, my_password, my_dbna…