This method use prepared statement for running safe query
Replace your inputs with ? and than send them to vars argument
mysql::query('select * from users where id = ?', [123456789]);is same as
mysql::pureQuery('select * from users where id = 123456789');If vars argument is empty, it will use pureQuery to run it as fast as possible
| Name | Type | Description | Required |
|---|---|---|---|
| query | string | Your desired query, replace inputs with ? | yes |
| vars | array | Your inputs, If this doesnt fill, pureQuery will be executed | no |
| need_result | bool | Set this true if you want query result(e.g for select queries | no |
Output : bool | mysqli_result
Static or normal : Static
mysql::query('select * from `users` where `id` = ? limit 1', [123456789]);mysql::query('update `users` set `step` = ? where `id` = ? limit 1', ['main',123456789]);