public int GetLastTopZhanDui(int month) { try { string strSql = string.Format("SELECT zhanduiid FROM t_zhandui_zhengba where `month`={0} and grade={1};", month, 1); return((int)DbHelperMySQL.GetSingleLong(strSql)); } catch (Exception ex) { } return(0); }
public int GetKuaFoWorldMaxTempRoleID(out int limit) { int asyncID = 50; int baseID = (int)DbHelperMySQL.GetSingleLong("select value from t_async where id = " + asyncID); if (baseID < 0) { baseID = 0; this.ExecuteSqlNoQuery(string.Format("INSERT IGNORE INTO t_async(`id`,`value`) VALUES({0},{1});", asyncID, baseID)); } limit = baseID + 199980; string sql = string.Format("select max(temprid) from `t_pt_roles` where temprid>={0} and temprid<={1}", baseID, baseID + 199999); int maxTempRoleID = (int)DbHelperMySQL.GetSingleLong(sql); if (maxTempRoleID <= 0) { maxTempRoleID = 0; } return(maxTempRoleID); }