double space for line break

This commit is contained in:
DokaDoka committed 2022-12-11 16:07:56 +11:00
1 parent 724c7e356d
commit 2b549c3d06
27 files changed
+63 -84

No files matched your search

+6 -7
View File
@@ -26,8 +26,8 @@ XAMPP is not a database, and should not be used solely to start your MySQL/Maria
## Configuration
You can change the configuration settings by using convars inside your `server.cfg`.
Reference the following for an idea of how to set your connection options.
You can change the configuration settings by using convars inside your `server.cfg`.
Reference the following for an idea of how to set your connection options.
You must include one of the following lines, adjusted for your connection and database settings.
:::caution
@@ -40,7 +40,7 @@ set mysql_connection_string "mysql://root:12345@localhost:3306/es_extended?chars
set mysql_connection_string "user=root;password=12345;host=localhost;port=3306;database=es_extended;charset=utf8mb4"
```
Certain special characters are reserved or blocked and may cause issues when used in your password.
Certain special characters are reserved or blocked and may cause issues when used in your password.
For more optional settings (such as multiple statements) you can reference [pool.d.ts](https://github.com/sidorares/node-mysql2/blob/master/typings/mysql/lib/Pool.d.ts#L10) and [connection.d.ts](https://github.com/sidorares/node-mysql2/blob/master/typings/mysql/lib/Connection.d.ts#L8).
You can also add the following convars if you require extra information when testing queries.
@@ -76,17 +76,16 @@ Before using the UI first you have to make sure you have the `mysql_ui` convar s
set mysql_ui true
```
Also make sure that you have `command` ace permission access, then you should be able to use the
`mysql` command in game to open up the UI and see your query data.
Also make sure that you have `command` ace permission access, then you should be able to use the `mysql` command in game to open up the UI and see your query data.
## Compatibility
You shouldn't run multiple mysql resources to ensure the best experience.
You shouldn't run multiple mysql resources to ensure the best experience.
The resources listed below can be deleted to allow oxmysql to handle the events, without any changes.
### mysql-async
Standard API for mysql-async uses `server_script '@mysql-async/lib/MySQL.lua'`.
Standard API for mysql-async uses `server_script '@mysql-async/lib/MySQL.lua'`.
Raw exports, mostly used in resources written in JavaScript or C#, are _not supported_.
### ghmattimysql
+1 -1
View File
@@ -4,7 +4,7 @@
This is usually the result of incorrect database settings or your password containing reserved characters (`; , / ? : @ & = + $ #`).
:::tip Solution
Ensure you have entered the correct database settings in the mysql_connection_string convar.
Ensure you have entered the correct database settings in the mysql_connection_string convar.
You can try using the semicolon-separated format if your password contains reserved characters.
:::
+2 -2
View File
@@ -43,7 +43,7 @@ import { oxmysql as MySQL } from '@overextended/oxmysql';
## Placeholders
Safely format queries by using placeholders in the query, and sending arguments in an array or object.
Safely format queries by using placeholders in the query, and sending arguments in an array or object.
Named placeholders are not recommended, and unsupported when using MySQL.prepare.
```lua
@@ -59,5 +59,5 @@ When uncertain if a row should be inserted into the database, or an existing row
MySQL.prepare('INSERT INTO ox_inventory (owner, name, data) VALUES (?, ?, ?) ON DUPLICATE KEY UPDATE data = VALUES(data)', { owner, dbId, inventory })
```
This is preferred over checking the existence of a row, then inserting or updating depending on the result.
This is preferred over checking the existence of a row, then inserting or updating depending on the result.
Furthermore, unlike using 'REPLACE INTO', the row is not deleted and re-inserted.
+1 -1
View File
@@ -1,6 +1,6 @@
# Prepare
The only function that provides true [prepared statements](https://github.com/sidorares/node-mysql2#using-prepared-statements), granting native protection and query planning by MySQL.
The only function that provides true [prepared statements](https://github.com/sidorares/node-mysql2#using-prepared-statements), granting native protection and query planning by MySQL.
Prepare can be used to execute frequently called queries faster and accepts multiple sets of parameters to be used with a single query.
- Date will not return the datestring commonly used in FiveM
+1 -1
View File
@@ -1,6 +1,6 @@
# Query
Generic function that can be utilised for any query.
Generic function that can be utilised for any query.
When selecting data it will return all matching rows and columns, otherwise it will return field data such as insertid, affectedRows, etc.
## Lua
+1 -1
View File
@@ -67,7 +67,7 @@ console.log(success);
## Shared Format
When using the `Shared` format you must pass two parameters to the oxmysql export. The `queries` and the `parameters` those queries will use.
When using the `Shared` format you must pass two parameters to the oxmysql export. The `queries` and the `parameters` those queries will use.
This is useful if your queries use the same SQL variables.
### Lua