Functions
The advantage of ice_mysql is that all the functions of other mysql handling scripts are reduced to two functions, one synchronous and one asynchronous.
MakeQuery
exports["ice_mysql"]:MakeQuery(db_id, query, params);Params:
Example:
Citizen.CreateThread(function()
local result = exports["ice_mysql"]:MakeQuery(1, "SELECT * FROM players WHERE `group`=?", {"admin"})
print(json.encode(result))
end)
-- or without db_id
Citizen.CreateThread(function()
local result = exports["ice_mysql"]:MakeQuery("SELECT * FROM players WHERE `group`=?", {"admin"})
print(json.encode(result))
end)Citizen.CreateThread(function()
exports["ice_mysql"]:MakeQuery(1, "UPDATE players SET ID=4 WHERE ID=5")
end)AsyncMakeQuery
Params:
Example:
Last updated