Пример #1
0
        public Falsable <MySQLiResult> QueryResult(string query, MySQLiResultMode resultMode = MySQLiResultMode.StoreResult)
        {
            // mixed query ( string $query [, int $resultmode = MYSQLI_STORE_RESULT ] )
            // Returns FALSE on failure. For successful SELECT, SHOW, DESCRIBE or EXPLAIN queries mysqli_query()
            // will return a mysqli_result object.
            // For other successful queries mysqli_query() will return TRUE.
            var q = new MySqlCommand(query, _connection);

            using (MySqlDataReader reader = q.ExecuteReader())
                return(new RuntimeMySQLiResult(this, reader));
        }
Пример #2
0
 public Falsable<MySQLiResult> QueryResult(string query, MySQLiResultMode resultMode = MySQLiResultMode.StoreResult)
 {
     // mixed query ( string $query [, int $resultmode = MYSQLI_STORE_RESULT ] )
     // Returns FALSE on failure. For successful SELECT, SHOW, DESCRIBE or EXPLAIN queries mysqli_query() 
     // will return a mysqli_result object. 
     // For other successful queries mysqli_query() will return TRUE.
     var q = new MySqlCommand(query, _connection);
     using (MySqlDataReader reader = q.ExecuteReader())
         return new RuntimeMySQLiResult(this, reader);
 }