Example of usage
$db->query("SET NAMES 'utf8'");
public query ( string $sql, array $params = [], array $types = [] ) : integer | ||
$sql | string | SQL query with placeholders "UPDATE users SET name = :name WHERE id = :id" |
$params | array | params for query placeholders (optional) array (':name' => 'John', ':id' => '123') |
$types | array | Types of params (optional) array (':name' => \PDO::PARAM_STR, ':id' => \PDO::PARAM_INT) |
Результат | integer | the number of rows |