Ejemplo n.º 1
0
        static public string SqlString(string sSql)
        {
            string sResult = "";

            using (QMySql s = new QMySql())
            {
                s.Open(sSql);
                if (s.GetRow())
                {
                    sResult = s.GetString(0);
                }
            }

            return(sResult);
        }
Ejemplo n.º 2
0
        static public IEnumerable <string> SqlList(string sql)
        {
            List <string> result = new List <string>();

            using (QMySql s = new QMySql())
            {
                s.Open(sql);
                while (s.GetRow())
                {
                    result.Add(s.GetString(0));
                }
            }

            return(result);
        }
Ejemplo n.º 3
0
        static public int SqlInt(bool useRawValues, string sql, params object[] args)
        {
            int nResult = 0;

            AddArgsToQuery(useRawValues, ref sql, args);

            using (QMySql s = new QMySql())
            {
                s.Open(sql);
                if (s.GetRow())
                {
                    nResult = s.GetInt(0);
                }
            }

            return(nResult);
        }