Skip to content
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.

Latest commit

 

History

History
36 lines (29 loc) · 912 Bytes

README.md

File metadata and controls

36 lines (29 loc) · 912 Bytes

RedM Async

RedM-async MySQL Async for RedM

INSTALLATION

Set it as a dependency in you __resource.lua or fxmanifest.lua

-- client
client_scripts {
	-- Not possible, resource is only server sided
	...
}

-- server
server_scripts {
	'@mysql-async/lib/MySQL.lua',
	...
}

API

MySQL.Async.execute(query, parameters, callback)

MySQL.Async.fetchAll(query, parameters, callback)

MySQL.Async.fetchScalar(query, parameters, callback)

MySQL.Async.transaction(queries, parameters, callback)

MySQL.Sync.execute(query, parameters)

MySQL.Sync.fetchAll(query, parameters)

MySQL.Sync.fetchScalar(query, parameters)

MySQL.Sync.transaction(queries, parameters, callback)

MySQL.ready(callback)

INFO

It uses the https://github.com/warxander/vSql library to provide a connection to your mysql server.