Files
oxmysql/lib
Luke 3e1426a859 chore(lib): bump package version
for whatever reason 1.1.0 had an older version of the js file
2022-07-11 19:30:24 +02:00
..
2022-06-18 16:32:07 +10:00
2022-07-11 19:30:24 +02:00

OxMySQL exports wrapper for FiveM

Types are fully supported and you will get intellisense on the oxmysql object when using it.

Installation

# With pnpm
pnpm add @overextended/oxmysql

# With Yarn
yarn add @overextended/oxmysql

# With npm
npm install @overextended/oxmysql

Usage

Import as module:

import { oxmysql } from '@overextended/oxmysql';

Import with require:

const { oxmysql } = require('@overextended/oxmysql');

Documentation

View documentation

MySQL.scalar('SELECT username FROM uses', (result) => {
    console.log(result)
}).catch(console.error)

MySQL.scalar('SELECT username FROM uses').then((result) => {
    console.log(result)
}).catch(console.error)

const result = await MySQL.scalar('SELECT username FROM uses').catch(console.error)
console.log(result)

License

LGPL-3.0