コード例 #1
0
        public static int CheckForGroupGID(string group)
        {
            int retint = -1;

            using (var dbCon = new MySQLDatabaseConnection(System.Net.IPAddress.Parse("127.0.0.1"), "exceeddb"))
            {
                dbCon.Username = "******";
                dbCon.Password = "******";
                dbCon.Connect();

                string command = string.Format("SELECT `groupid` FROM `groupDB` WHERE `groupname`='{0}'", group);
                retint = dbCon.SearchForInt(command, "groupid");

                command = string.Empty;
                dbCon.Close();
            }
            return(retint);
        }