$resultset = system_base_Database::query($sql_cmd, $args, null); $data = haxe_Serializer::run(_hx_anonymous(array("rows" => $resultset->results(), "total_rows" => $resultset->get_length()))); $fout = sys_io_File::write($filename, false); $fout->writeString(_hx_string_or_null($header) . "\n"); $fout->writeString(_hx_string_or_null($data) . "\n"); $fout->close(); } return $return_data; } static function close() { if (system_base_Database::$cnx !== null) { system_base_Database::$cnx->close(); } system_base_Cache::disable_db_profiling(); system_base_Database::$cnx = null; system_base_Database::$instance = null; } static function sprint_float($v, $places) { $sql = "SELECT FORMAT(" . Std::string($v) . "," . Std::string($places) . ") AS n;"; return system_base_Database::$cnx->request($sql)->results()->first()->n; } function __toString() { return 'system.base.Database'; } } system_base_Database::$Explain_array = new _hx_array(array("ID", "SELECT_TYPE", "TABLE", "TYPE", "POSSIBLE_KEYS", "KEY", "KEY_LEN", "REF", "ROWS", "EXTRA")); system_base_Database::$Proc_array = new _hx_array(array("FIELD_NAME", "MIN_VALUE", "MAX_VALUE", "MIN_LENGTH", "MAX_LENGTH", "EMPTIES_OR_ZEROS", "NULLS", "AVG_VALUE_OR_AVG_LENGTH", "STD", "OPTIMAL_FIELDTYPE")); system_base_Database::$regexp = new EReg("^(SELECT|UPDATE|INSERT|DELETE|PREPARE|EXECUTE|SET)", "i");