From e90e859cf9bd9ecb210c861e42786b4c3aa74a56 Mon Sep 17 00:00:00 2001 From: Dunak <19434539+dunak-debug@users.noreply.github.com> Date: Thu, 9 Sep 2021 12:28:10 +0200 Subject: [PATCH] Update index --- index.md | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/index.md b/index.md index 792384c..a0ce78e 100644 --- a/index.md +++ b/index.md @@ -4,20 +4,24 @@ oxmysql is a database wrapper for FiveM utilising [node-mysql2](https://github.com/sidorares/node-mysql2) offering improved performance and security. -### Comparison - -TODO - ### Query cache -Every executed query is being prepared and stored into cache for faster performance using prepared statements. These statements are also being sanitized from vulnerable SQL injection and accepts two types of parameters: +Every executed query is being prepared and stored into cache for faster performance using prepared statements. These statements are also being sanitized from vulnerable SQL injection ```lua -...'SELECT * FROM `users` WHERE `identifier` = ? AND `group` = ?', -{ playerIdentifier, playerGroup } ... +'SELECT * FROM `users` WHERE `identifier` = ? AND `group` = ?', { playerIdentifier, playerGroup } ``` -```lua -...'SELECT * FROM `users` WHERE `identifier` = :id AND `group` = :group', -{ id = playerIdentifier, group = playerGroup } +### Installation + +* Download `oxmysql.zip` from https://github.com/overextended/oxmysql/releases/latest +* Put `oxmysql` in the `resources` folder +* Configure in `server.cfg` +* Put `ensure oxmysql` before your resources + +### Configuration + +``` +set mysql_connection_string "mysql://user:password@host/database?charset=utf8mb4" +set mysql_slow_query_warning 100 ```