/vSql

FiveM MySQL resource

Primary LanguageC#

vSql

FiveM resource for connecting to MySQL database.

Features

How to Install

  • Download and put into resources/ folder
  • Add ensure vSql to server.cfg
  • Add set mysql_connection_string "server=localhost;database=db;userid=user;password=pwd" to server.cfg
  • Add server_script "@vSql/vSql.lua" to __resource.lua

API

vSql.Async.execute(query, parameters, callback)
vSql.Async.transaction(queries, parameters, callback)

vSql.Async.fetchScalar(query, parameters, callback)
vSql.Async.fetchAll(query, parameters, callback)