__construct()
__construct(\mysqli $db) : mixed
Creates a new Mysql object.
Parameters
| \mysqli | $db | The database. |
Functions related to database queries.
execute(string $sql, callable|null $bind = null) : \naigc\v25\util\IMysql
Executes an INSERT/UPDATE/DELETE query.
| string | $sql | The query to run. |
| callable|null | $bind | A function that binds the SQL parameters. Must declare $stmt as the only parameter. |
The Mysql object.
query(string $sql, callable|null $bind = null, callable|null $useResults = null) : \naigc\v25\util\IMysql
Executes a SELECT query.
| string | $sql | The query to run. |
| callable|null | $bind | A function that binds the SQL parameters. Must declare $stmt as the first of two parameters. |
| callable|null | $useResults | A function to be called for every row returned by the query. Must declare $row as the second of two parameters. |
The Mysql object.