首页 > 数据库 >C# 查询数据库

C# 查询数据库

时间:2022-11-09 13:44:52浏览次数:45  
标签:return string C# ex 查询数据库 result

public static string GetLightweightEngineStrategy()
        {
            try
            {
                string sql = "select * from core_arg where ArgGroup = 'WebConfig' and ArgText = 'LightweightEngineStrategy'";
                var result = MySqlDataHelper.ExecuteDataRow(sql);
                if (result != null)
                {
                    string agrValue = result["ArgValue"].ToString();
                    return agrValue;
                }
                else
                {
                    return "";
                }
            }
            catch (Exception ex)
            {
                LogHelper.WriteLog("GetLightweightEngineStrategy", ex);
                throw ex;
            }
        }

 

标签:return,string,C#,ex,查询数据库,result
From: https://www.cnblogs.com/sangzs/p/16873344.html

相关文章