mariadb query file

From Onset Developer Wiki
mariadb query file

Type: Function
Context: Server
Introduced: v1.0

NOTICE

This function is provided by the official MariaDB plugin.

Description

This function reads all queries from the specified file and executes them.

Syntax

mariadb_query_file(handle_id, file_path [, callback_func, callback_args])

Parameters

  • handle_id
    The mariaDB handle identifier.
  • file_path
    The file to read the queries from.
  • callback_func (optional)
    The callback name.
  • callback_args (optional)
    The callback arguments.

Return Value

  • Returns true if success.

Example

mariadb_query_file(db, "players.sql")

See also