Wiki

Clone wiki

EFLC-MP LUA / mysql_query

Description

Perfoms a query

Parameters

Int databaseId, String query, Bool returnResults
Int databaseId: id of the database

String query: the query

Bool returnResults: Whether the API should search the query for results. Use true only for SELECT.

Return values

table result
IF returnResults is false THEN this function will return true if the query was successful or false if the query failed.

If returnResults is TRUE then this function returns a table containing the query results. In case the query caused a MySQL error then the result will a false bool.

Example

Updated