Skip to content

mysql_tquery_file

imshooter edited this page Dec 1, 2026 · 2 revisions

Send the queries of a file in scriptfiles, one after another, and call a public when they are done.

The queries are split at semicolons outside quotes and comments. They stop at the first that fails. Each query gives a result of the cache, which cache_set_result chooses.

native bool:mysql_tquery_file(
    MySQL:handle,
    const file_path[],
    const callback[] = "",
    const format[] = "",
    {Float, _}:...
);

With open.mp names, from the same include:

native bool:MySQL_ThreadedQueryFile(
    MySQL:handle,
    const file_path[],
    const callback[] = "",
    const format[] = "",
    {Float, _}:...
);

Parameters

Parameter Description
MySQL:handle Handle to send them through.
const file_path[] Path of the file inside scriptfiles.
const callback[] = "" Public to call, or none.
const format[] = "" Letters of the values the public receives.
{Float, _}:... The values.

Returns

  • true when they were sent.
  • false when the handle does not exist, the file cannot be read or has no query, the callback is not a public of the script, or the format does not match the values.

Home

Guides

Reference

Functions

Connections
Queries
Cache
JSON cells
ORM
Queries built in pieces
Prepared statements
Batches
Transactions
Passwords
Callbacks

Clone this wiki locally