String dateNow= DateTime.Now.ToString("yyyyMMddhhmmss"+ new Random().Next(1, 99)); //随机数
StringBuilder sqlStr = new StringBuilder();
//1.添加年卡基础信息,获得自增ID
sqlStr.Append(" insert a set a.id=1; select @@IDENTITY " ,
//自增id
int num = int.Parse(Shove.Database.MySQL.ExecuteScalar(sqlStr.ToString()).ToString());
时间: 2024-10-11 17:38:46