From 2b549c3d0615179db5b5657aec723b8409852760 Mon Sep 17 00:00:00 2001 From: DokaDoka Date: Sun, 11 Dec 2022 16:07:56 +1100 Subject: [PATCH] double space for line break --- docs/index.md | 5 ++--- docs/ox_core/Getting Started/concepts.md | 2 +- docs/ox_core/Getting Started/index.md | 6 ++--- docs/ox_core/Player/Server/methods.md | 4 ++-- docs/ox_core/Vehicle/Server/index.md | 4 ++-- docs/ox_core/Vehicle/Server/methods.md | 2 +- docs/ox_inventory/Functions/Client/useItem.md | 2 +- docs/ox_inventory/Getting Started/index.md | 8 +++---- docs/ox_inventory/Getting Started/issues.md | 8 +++---- docs/ox_inventory/Guides/index.md | 2 +- docs/ox_lib/ACL/Server.md | 2 +- docs/ox_lib/Cache/Client.md | 2 +- docs/ox_lib/Interface/Client/alert.md | 2 +- docs/ox_lib/Interface/Client/context.md | 21 ++++++------------ docs/ox_lib/Interface/Client/input.md | 14 ++++-------- docs/ox_lib/Locale/Shared.md | 2 +- docs/ox_lib/Logger/Server.md | 6 ++--- docs/ox_lib/Streaming/Client.md | 2 +- docs/ox_lib/VehicleProperties/Client.md | 2 +- docs/ox_lib/index.md | 22 +++++++------------ docs/ox_target/Usage/Target.md | 4 ++-- docs/oxmysql/Getting Started/index.md | 13 +++++------ docs/oxmysql/Getting Started/issues.md | 2 +- docs/oxmysql/Usage/index.md | 4 ++-- docs/oxmysql/Usage/prepare.md | 2 +- docs/oxmysql/Usage/query.md | 2 +- docs/oxmysql/Usage/transaction.md | 2 +- 27 files changed, 63 insertions(+), 84 deletions(-) diff --git a/docs/index.md b/docs/index.md index 5a2d2925..55d6dbf5 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,12 +4,11 @@ title: Home Here you can find all of the official documentation for resources developed by the Overextended team -If you feel like the documentation is lacking in some department then feel free to go onto that page -and click the "Edit this page" at the bottom and submit a Pull Request. +If you feel like the documentation is lacking in some department then feel free to go onto that page and click the "Edit this page" at the bottom and submit a Pull Request. ## Support our team -Our projects will always remain free and open-source, with our core developers working voluntarily. +Our projects will always remain free and open-source, with our core developers working voluntarily. If you love what we do and want to help us continue, why not show your appreciation with a donation?
diff --git a/docs/ox_core/Getting Started/concepts.md b/docs/ox_core/Getting Started/concepts.md index 2a723895..867dc3d8 100644 --- a/docs/ox_core/Getting Started/concepts.md +++ b/docs/ox_core/Getting Started/concepts.md @@ -4,7 +4,7 @@ We'll try to explain some technical but core concepts used in ox_core here. ## Classes -Lua doesn't have support for true classes, but rather prototype-based inheritance. +Lua doesn't have support for true classes, but rather prototype-based inheritance. A prototype can hold its own variables and methods, which another object (an instance) can reference or call. ```lua diff --git a/docs/ox_core/Getting Started/index.md b/docs/ox_core/Getting Started/index.md index 199d33aa..b0904e6d 100644 --- a/docs/ox_core/Getting Started/index.md +++ b/docs/ox_core/Getting Started/index.md @@ -10,12 +10,12 @@ import TabItem from '@theme/TabItem'; :::caution -This resource is **not production ready**. Breaking changes are guaranteed, and support is limited. +This resource is **not production ready**. Breaking changes are guaranteed, and support is limited. Documentation may fall behind and be rendered obsolete. ::: -We **strongly** recommend using Git to help with version control and separating your own changes from the original source code. +We **strongly** recommend using Git to help with version control and separating your own changes from the original source code. Refer to [GitHub's guide to setting up Git](https://docs.github.com/en/get-started/quickstart/set-up-git#setting-up-git). You can also download a Git GUI client, such as [GitKraken](https://www.gitkraken.com/), to improve your workflow and more easily maintain changes. @@ -72,7 +72,7 @@ Phone with many built-in apps such as Twitter, Marketplace, and Notes; with supp ### pefcl -Banking and financing, with support for multiple, unique, and shared accounts. +Banking and financing, with support for multiple, unique, and shared accounts. If using it with [ox_inventory](https://github.com/overextended/ox_inventory), open `pefcl/config.json` and enable framework integration. ```json diff --git a/docs/ox_core/Player/Server/methods.md b/docs/ox_core/Player/Server/methods.md index 86c17aee..45c5cba4 100644 --- a/docs/ox_core/Player/Server/methods.md +++ b/docs/ox_core/Player/Server/methods.md @@ -21,7 +21,7 @@ player.set(key, value, replicated) ## player.setdb -Update the player's metadata and store in the DB, optionally syncing it with the client. +Update the player's metadata and store in the DB, optionally syncing it with the client. Note: These values are not synced to the client on login; you will need to use `player.set`. ```lua @@ -87,7 +87,7 @@ player.getGroups() ## player.hasGroup -Check if the player is a member of a given group, and returns the matching group name and grade. +Check if the player is a member of a given group, and returns the matching group name and grade. The filter can be a string, array, or object where key is the group, and value is the minimum grade. ```lua diff --git a/docs/ox_core/Vehicle/Server/index.md b/docs/ox_core/Vehicle/Server/index.md index d2e053c1..37a47bf2 100644 --- a/docs/ox_core/Vehicle/Server/index.md +++ b/docs/ox_core/Vehicle/Server/index.md @@ -27,7 +27,7 @@ end ## Ox.CreateVehicle -Spawns a vehicle and returns the instance of CVehicle. +Spawns a vehicle and returns the instance of CVehicle. If the first argument is a number, it will attempt to spawn a vehicle from the database with a matching id. ```lua @@ -43,7 +43,7 @@ if vehicleId then end ``` -If the first argument is a table and the owner property is a number, or nil, the vehicle will be added to the database. +If the first argument is a table and the owner property is a number, or nil, the vehicle will be added to the database. Setting the owner as false creates a non-persistent vehicle. ```lua diff --git a/docs/ox_core/Vehicle/Server/methods.md b/docs/ox_core/Vehicle/Server/methods.md index 9ee821e4..057afbeb 100644 --- a/docs/ox_core/Vehicle/Server/methods.md +++ b/docs/ox_core/Vehicle/Server/methods.md @@ -86,7 +86,7 @@ vehicle.setGroup(group) ## vehicle.setPlate -Sets the vehicle's plate, used in the database to ensure uniqueness. Does not necessarily match the plate property (i.e. fake plates). +Sets the vehicle's plate, used in the database to ensure uniqueness. Does not necessarily match the plate property (i.e. fake plates). Plate is always formatted to 8 characters. ```lua diff --git a/docs/ox_inventory/Functions/Client/useItem.md b/docs/ox_inventory/Functions/Client/useItem.md index d2b76680..76a4e3d0 100644 --- a/docs/ox_inventory/Functions/Client/useItem.md +++ b/docs/ox_inventory/Functions/Client/useItem.md @@ -1,4 +1,4 @@ -Uses the passed item, then triggers the callback function. +Uses the passed item, then triggers the callback function. Should be calling during item callbacks to utilise the builtin methods (server checks, progress bar, etc.). ```lua diff --git a/docs/ox_inventory/Getting Started/index.md b/docs/ox_inventory/Getting Started/index.md index 231a8144..23cfb63e 100644 --- a/docs/ox_inventory/Getting Started/index.md +++ b/docs/ox_inventory/Getting Started/index.md @@ -19,8 +19,8 @@ otherwise you **should not** install this resource. ### oxmysql -We utilise our own resource to communicate with MySQL databases via the node-mysql2 package. -The backend is actively maintained and updated unlike the package used by mysql-async, providing improved performance, security, and features. +We utilise our own resource to communicate with MySQL databases via the node-mysql2 package. +The backend is actively maintained and updated unlike the package used by mysql-async, providing improved performance, security, and features. We provide full backwards compatibility with mysql-async and build for the current Cfx architecture. @@ -43,7 +43,7 @@ The resources listed under here **aren't** necessary for the inventory to work b ### ox_target -A performant and flexible standalone "third-eye" targeting resource. +A performant and flexible standalone "third-eye" targeting resource. Stashes, shops, and crafting benches will be accessible via zone targets instead of using markers. @@ -60,7 +60,7 @@ The inventory will handle disabling the phone when the player has no item, and s ### Production Build -The user interface included with the source code must be compiled. +The user interface included with the source code must be compiled. You can compile it yourself by following the [build guide](./Guides/inventory_ui), otherwise download a production build below. diff --git a/docs/ox_inventory/Getting Started/issues.md b/docs/ox_inventory/Getting Started/issues.md index b8fc40e7..b6f3fb3c 100644 --- a/docs/ox_inventory/Getting Started/issues.md +++ b/docs/ox_inventory/Getting Started/issues.md @@ -8,16 +8,16 @@ sidebar_position: 1 Because the UI for inventory is written in React it can't run natively under FiveM so it must first be bundled into html/css/js. -We provide an easy way for you to do this by downloading a pre-bundled release, which you can get from [here](https://github.com/overextended/ox_inventory/releases/latest). +We provide an easy way for you to do this by downloading a pre-bundled release, which you can get from [here](https://github.com/overextended/ox_inventory/releases/latest). Make sure you download the `ox_inventory.zip` file as that one contains the bundled files and others are raw source code. -If in case you wanted to edit the inventory UI you would have to build these files yourself. +If in case you wanted to edit the inventory UI you would have to build these files yourself. To do so please read our [_Building inventory UI_](../Guides/inventory_ui.md) guide. ## Stashes / trunks are not saved at server restart -The only supported way of doing a restart is **txAdmin scheduled restart**. +The only supported way of doing a restart is **txAdmin scheduled restart**. txAdmin scheduled restart should be your only way of restarting a server in production. -If you need to do a manual restart, you must use `/saveinv` before restarting the server. +If you need to do a manual restart, you must use `/saveinv` before restarting the server. If you don't do this, all inventory except players inventory will not be saved. diff --git a/docs/ox_inventory/Guides/index.md b/docs/ox_inventory/Guides/index.md index 0e3486a7..8882e681 100644 --- a/docs/ox_inventory/Guides/index.md +++ b/docs/ox_inventory/Guides/index.md @@ -2,5 +2,5 @@ title: Guides --- -Providing examples and explaining certain inventory API into more detail. +Providing examples and explaining certain inventory API into more detail. If you have trouble understanding how some of the API works check out our [**_example resource_**](https://github.com/overextended/ox_inventory_examples). diff --git a/docs/ox_lib/ACL/Server.md b/docs/ox_lib/ACL/Server.md index 65991638..eae61e7e 100644 --- a/docs/ox_lib/ACL/Server.md +++ b/docs/ox_lib/ACL/Server.md @@ -1,4 +1,4 @@ -Wrapper around the built-in ACL system. Handles lib.addCommand and ox_groups permissions. +Wrapper around the built-in ACL system. Handles lib.addCommand and ox_groups permissions. Refer to [Basic Aces & Principals overview/guide](https://forum.cfx.re/t/basic-aces-principals-overview-guide/90917) for more information. import Tabs from '@theme/Tabs'; diff --git a/docs/ox_lib/Cache/Client.md b/docs/ox_lib/Cache/Client.md index 553c89d9..4847df33 100644 --- a/docs/ox_lib/Cache/Client.md +++ b/docs/ox_lib/Cache/Client.md @@ -1,7 +1,7 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -Caches data related to the player and handling some events or statebags. +Caches data related to the player and handling some events or statebags. An interval runs every 100ms to update data that cannot be checked via handlers. ## States diff --git a/docs/ox_lib/Interface/Client/alert.md b/docs/ox_lib/Interface/Client/alert.md index 53497fcd..fe9053cb 100644 --- a/docs/ox_lib/Interface/Client/alert.md +++ b/docs/ox_lib/Interface/Client/alert.md @@ -5,7 +5,7 @@ title: Alert Dialog import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; -Simple alert dialog that can display a message to the player. +Simple alert dialog that can display a message to the player. Returns whether the player pressed the confirm button or canceled the dialog. ### lib.alertDialog diff --git a/docs/ox_lib/Interface/Client/context.md b/docs/ox_lib/Interface/Client/context.md index 2972a25e..e727c92c 100644 --- a/docs/ox_lib/Interface/Client/context.md +++ b/docs/ox_lib/Interface/Client/context.md @@ -77,10 +77,8 @@ lib.registerContext(context) You can register as many context menus in one `lib.registerContext` function as you'd like. -The menu can be either in the order you write it in, or sorted alphabetically. -To sort the menu alphabetically the buttons (and/or metadata) need to be defined as keys, -otherwise not using keys and instead using tables will make the menu be in the order you -define it as. +The menu can be either in the order you write it in, or sorted alphabetically. +To sort the menu alphabetically the buttons (and/or metadata) need to be defined as keys, otherwise not using keys and instead using tables will make the menu be in the order you define it as. ### lib.showContext @@ -283,8 +281,7 @@ RegisterCommand('testcontext', () => { -To trigger the event from the `Event button` and get it's data we first -need to register the event properly: +To trigger the event from the `Event button` and get it's data we first need to register the event properly: @@ -337,19 +334,15 @@ onNet('some_event', () => { -The data from the `args` table in the menu is passed as a first argument to -the event you register, in this case that argument is called `data`. +The data from the `args` table in the menu is passed as a first argument to the event you register, in this case that argument is called `data`. Using this event we also register a new context menu with it's own options. -By defining a `menu` param to be the id of the first menu we can get the -neat back arrow button next to the menu title that will take us back. +By defining a `menu` param to be the id of the first menu we can get the neat back arrow button next to the menu title that will take us back. -If we have a button that does not define either event, serverEvent or menu -the button will do nothing upon being clicked. +If we have a button that does not define either event, serverEvent or menu the button will do nothing upon being clicked. -Of course just registering the event won't do much so we need to display it -with the `lib.showContext` function, passing in the menu's id. +Of course just registering the event won't do much so we need to display it with the `lib.showContext` function, passing in the menu's id. ![menu_example](https://i.imgur.com/aJu92dv.png) ![metadata](https://i.imgur.com/kFGSlBF.png) diff --git a/docs/ox_lib/Interface/Client/input.md b/docs/ox_lib/Interface/Client/input.md index f47a9a17..59ba65c5 100644 --- a/docs/ox_lib/Interface/Client/input.md +++ b/docs/ox_lib/Interface/Client/input.md @@ -58,21 +58,15 @@ lib.inputDialog(heading, rows) * step?: `number` * Amount of change per slider step. Used only with `'slider'` type. -The callback data is promise based meaning that the thread will -not continue executing until the user either sends the data -or exits the popup. +The callback data is promise based meaning that the thread will not continue executing until the user either sends the data or exits the popup. -The data returned will be a table (array), indexes represent the rows -sent to the dialog, so if we want data from the first field that -would be index `1` (`0`), if we want data from the third field, that would -be index `3` (`2`), etc... +The data returned will be a table (array), indexes represent the rows sent to the dialog, so if we want data from the first field that would be index `1` (`0`), if we want data from the third field, that would be index `3` (`2`), etc... -The standard input rows will always return a string, if you want a row to be of -number data type, you can use set the `type` to `number`. +The standard input rows will always return a string, if you want a row to be of number data type, you can use set the `type` to `number`. If a user left an input field empty it will return `nil`. -You can also add checkboxes that will return `true` if checked and `nil` if unchecked. +You can also add checkboxes that will return `true` if checked and `nil` if unchecked. Look at the *Advanced* example for it's usage. :::caution diff --git a/docs/ox_lib/Locale/Shared.md b/docs/ox_lib/Locale/Shared.md index dd24e971..35367758 100644 --- a/docs/ox_lib/Locale/Shared.md +++ b/docs/ox_lib/Locale/Shared.md @@ -1,4 +1,4 @@ -Allows servers to set a preferred language and attempt to load locale files in any resources using the module. +Allows servers to set a preferred language and attempt to load locale files in any resources using the module. Locale files should use the [ISO Language Code](http://www.lingoes.net/en/translator/langcode.htm) and be saved as `./locales/langcode.json` To change the preferred language from English, add the convar to your server.cfg diff --git a/docs/ox_lib/Logger/Server.md b/docs/ox_lib/Logger/Server.md index c3034660..d2a8519d 100644 --- a/docs/ox_lib/Logger/Server.md +++ b/docs/ox_lib/Logger/Server.md @@ -1,6 +1,6 @@ ## Submit logs to Datadog -Register an account with [datadog](https://www.datadoghq.com/). Once registered you need to create an [API key](https://app.datadoghq.com/organization-settings/api-keys). +Register an account with [datadog](https://www.datadoghq.com/). Once registered you need to create an [API key](https://app.datadoghq.com/organization-settings/api-keys). Modify your `server.cfg` with the newly generated API key and [intake server](https://docs.datadoghq.com/api/latest/logs/#send-logs). - datadoghq.com @@ -22,8 +22,8 @@ lib.logger(source, event, message, ...) - message: `string` - ...: `string` -Source is passed to `ddsource` and creates a tag. Could be playerId, identifier, -1, or server. -Event is passed to `ddservice` and displays in the logs list. +Source is passed to `ddsource` and creates a tag. Could be playerId, identifier, -1, or server. +Event is passed to `ddservice` and displays in the logs list. Additional arguments are converted into tags for additional filtering and search options. ```lua diff --git a/docs/ox_lib/Streaming/Client.md b/docs/ox_lib/Streaming/Client.md index 20be729d..1d892e24 100644 --- a/docs/ox_lib/Streaming/Client.md +++ b/docs/ox_lib/Streaming/Client.md @@ -1,4 +1,4 @@ -Check if assets exist, such as models, and loads them into memory. +Check if assets exist, such as models, and loads them into memory. Throws errors for invalid assets and returns true if the asset is loaded. import Tabs from '@theme/Tabs'; diff --git a/docs/ox_lib/VehicleProperties/Client.md b/docs/ox_lib/VehicleProperties/Client.md index 429fd107..50692ee4 100644 --- a/docs/ox_lib/VehicleProperties/Client.md +++ b/docs/ox_lib/VehicleProperties/Client.md @@ -1,4 +1,4 @@ -Mostly follows the format used by ESX and QBCore, with extra data such as damaged/missing props. +Mostly follows the format used by ESX and QBCore, with extra data such as damaged/missing props. https://github.com/overextended/ox_lib/blob/master/resource/vehicleProperties/client.lua#L5 import Tabs from '@theme/Tabs'; diff --git a/docs/ox_lib/index.md b/docs/ox_lib/index.md index f6005759..b66a5942 100644 --- a/docs/ox_lib/index.md +++ b/docs/ox_lib/index.md @@ -8,7 +8,7 @@ import TabItem from '@theme/TabItem'; ox_lib is a collection of Lua and UI functions to utilise in other resources. -The UI is built in React so the code needs to be compiled into standard JS. +The UI is built in React so the code needs to be compiled into standard JS. If you don't know how to do this then please download the [release](https://github.com/overextended/ox_lib/releases/latest) (ox_lib.zip) which is *already* compiled into a working resource. @@ -40,9 +40,8 @@ All supported functions are located inside the `resource` folder in the lib. You can get the npm package [here](https://npmjs.com/package/@overextended/ox_lib). -**Usage:** -You can either import the whole library object which contains all the functions for that scope (client/server/shared) or -you can deconstruct it and import the functions you find needed at the time. +**Usage:** +You can either import the whole library object which contains all the functions for that scope (client/server/shared) or you can deconstruct it and import the functions you find needed at the time. ```ts import lib from '@overextended/ox_lib/server' @@ -64,17 +63,13 @@ add_ace resource.ox_lib command.add_principal allow add_ace resource.ox_lib command.remove_principal allow ``` -That's it! -You can now use the library functions inside of your resource, check the rest of the -documentation to see how to utilise them. +That's it! +You can now use the library functions inside of your resource, check the rest of the documentation to see how to utilise them. ## Using icons for interface functions -The icon library used is Font Awesome 6.0, if for the icon you define only a string -the default icon type will be `solid`. -If you want to use a different icon type, i.e -apple as a brand, you need to define icon as a table (`array`) with the first value being -the icon type (`fas`, `far`, `fab`) as a string, and the second being the icon name. +The icon library used is Font Awesome 6.0, if for the icon you define only a string the default icon type will be `solid`. +If you want to use a different icon type, i.e apple as a brand, you need to define icon as a table (`array`) with the first value being the icon type (`fas`, `far`, `fab`) as a string, and the second being the icon name. @@ -95,8 +90,7 @@ icon: ['fab', 'apple'] ## Building the UI -If you wish to edit any of the UI elements you will need to download the *source* code, edit what you need and then -compile it. +If you wish to edit any of the UI elements you will need to download the *source* code, edit what you need and then compile it. :::danger diff --git a/docs/ox_target/Usage/Target.md b/docs/ox_target/Usage/Target.md index 8fad683b..a334e85b 100644 --- a/docs/ox_target/Usage/Target.md +++ b/docs/ox_target/Usage/Target.md @@ -42,7 +42,7 @@ exports.ox_target:removeModel(models, optionNames) ## addEntity -Add new options when targeting a networked entity matching the given netid or list of netIds. +Add new options when targeting a networked entity matching the given netid or list of netIds. Requires the use of [NetworkGetNetworkIdFromEntity](https://docs.fivem.net/natives/?_0x9E35DAB6) on an entity id. ```lua @@ -51,7 +51,7 @@ exports.ox_target:addEntity(netIds, options) ## removeEntity -Remove options from a networked entity matching the given netid or list of netIds. +Remove options from a networked entity matching the given netid or list of netIds. Requires the use of [NetworkGetNetworkIdFromEntity](https://docs.fivem.net/natives/?_0x9E35DAB6) on an entity id. ```lua diff --git a/docs/oxmysql/Getting Started/index.md b/docs/oxmysql/Getting Started/index.md index d5ba6d21..6af53e41 100644 --- a/docs/oxmysql/Getting Started/index.md +++ b/docs/oxmysql/Getting Started/index.md @@ -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 diff --git a/docs/oxmysql/Getting Started/issues.md b/docs/oxmysql/Getting Started/issues.md index bc3c0492..4c5cdc60 100644 --- a/docs/oxmysql/Getting Started/issues.md +++ b/docs/oxmysql/Getting Started/issues.md @@ -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. ::: diff --git a/docs/oxmysql/Usage/index.md b/docs/oxmysql/Usage/index.md index 236e398e..f362c638 100644 --- a/docs/oxmysql/Usage/index.md +++ b/docs/oxmysql/Usage/index.md @@ -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. diff --git a/docs/oxmysql/Usage/prepare.md b/docs/oxmysql/Usage/prepare.md index 2bf51aab..412baf29 100644 --- a/docs/oxmysql/Usage/prepare.md +++ b/docs/oxmysql/Usage/prepare.md @@ -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 diff --git a/docs/oxmysql/Usage/query.md b/docs/oxmysql/Usage/query.md index 82ffe2cd..9123da24 100644 --- a/docs/oxmysql/Usage/query.md +++ b/docs/oxmysql/Usage/query.md @@ -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 diff --git a/docs/oxmysql/Usage/transaction.md b/docs/oxmysql/Usage/transaction.md index 14d3fe8f..ef60bed0 100644 --- a/docs/oxmysql/Usage/transaction.md +++ b/docs/oxmysql/Usage/transaction.md @@ -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