예제 #1
0
        public int InitZhanDui(TianTi5v5ZhanDuiData data)
        {
            string sql = string.Format("INSERT INTO t_kf_5v5_zhandui(`leaderid`,`xuanyan`,`zhanduiname`,`duanweiid`,`zhanli`,`data1`,`leaderrolename`,zoneid) VALUES('{1}','{2}','{3}','{4}','{5}',@content,'{6}',{7});", new object[]
            {
                data.ZhanDuiID,
                data.LeaderRoleID,
                data.XuanYan,
                data.ZhanDuiName,
                data.DuanWeiId,
                data.ZhanDouLi,
                data.LeaderRoleName,
                data.ZoneID
            });
            List <Tuple <string, byte[]> > imgList = new List <Tuple <string, byte[]> >();

            imgList.Add(new Tuple <string, byte[]>("@content", DataHelper2.ObjectToBytes <List <TianTi5v5ZhanDuiRoleData> >(data.teamerList)));
            LogManager.WriteLog(LogTypes.SQL, sql, null, true);
            return((int)DbHelperMySQL.ExecuteSqlGetIncrement(sql, imgList));
        }
예제 #2
0
        public long CreateZhengDuoFuBen(int gametype, int serverId)
        {
            string sql = string.Format("INSERT INTO t_game(gametype,serverid,createtime) VALUES({0},{1},NOW());", gametype, serverId);

            return(DbHelperMySQL.ExecuteSqlGetIncrement(sql, null));
        }