Function
Database:Select
Selects a query synchronously
Syntax
my_database:Select(query, parameters... = nil)
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
query
|
string | — | Query to execute |
parameters...
optional
|
any | nil |
Sequence of parameters to escape into the Query |
Returns
- table[] rows fetched
- string error (if any)
Examples
local rows = my_database:Select("SELECT * FROM MyTable WHERE name = :0 AND title = :1", "Val", "AnotherVal")