MetaMySQL.Query
MetaMySQL.Query(sql, params, callback)
Executes a SELECT query with prepared placeholders (:0, :1) and returns row array.
Parametri & Opzioni
| Parametro | Tipo | Stato | Descrizione |
|---|---|---|---|
sql |
string | Obbligatorio | SQL statement with :0, :1 placeholders. |
params |
any[] | Opzionale (default: {}) |
Parameters array. |
callback |
function(rows, err) | Obbligatorio | Result callback. |
Valore di Ritorno
void — No return value.
Esempio d'Uso
MetaMySQL.Query("SELECT * FROM users WHERE identifier = :0 LIMIT 1", { "char1:7656..." }, function(rows, err)
if rows and #rows > 0 then Console.Log("Found user: %s", rows[1].firstname) end
end)