Files
overextended.github.io/docs/oxmysql/Getting Started/placeholders.md
T
2022-12-11 15:00:43 +11:00

12 lines
433 B
Markdown

# Placeholders
This allows queries to be properly prepared and escaped; the following lines are equivalent.
```lua
"SELECT group FROM users WHERE identifier = ?", {identifier}
"SELECT group FROM users WHERE identifier = :identifier", {identifier = identifier}
"SELECT group FROM users WHERE identifier = @identifier", {['@identifier'] = identifier}
```
Named placeholders are deprecated and should be avoided as much as possible.