Esempio n. 1
0
        public virtual XVar db_getfieldslist(XVar strSQL)
        {
            XVar           res = XVar.Array();
            RunnerDBReader rs  = conn.query(strSQL).getQueryHandle() as RunnerDBReader;

            for (int i = 0; i < rs.FieldCount; i++)
            {
                res[i] = new XVar("fieldname", rs.GetName(i), "type", rs.GetFieldType(i), "not_null", 0);
            }
            rs.Connection.Close();
            return(res);
        }
Esempio n. 2
0
        /**
         * An interface stub
         * Fetch a result row as an associative array
         * @param Mixed qHanle		The query handle
         * @return Array
         */
        public XVar fetch_array(dynamic qHanle)
        {
            //db_fetch_array
            if (qHanle != null)
            {
                RunnerDBReader reader = (RunnerDBReader)qHanle;
                if (reader.Read())
                {
                    XVar result = new XVar();
                    for (int i = 0; i < reader.FieldCount; i++)
                    {
                        result.SetArrayItem(reader.GetName(i), reader[i]);
                    }
                    return(result);
                }
            }

            return(XVar.Array());
        }