public function bindParameters(mysqli_stmt $statement, array $parameters)
    {
        // Because mysqli_stmt::bind_param arguments must be passed by reference
        // we need to do a bit of hackery
        $boundNames = [];
        $parametersCount = count($parameters);
        for ($i = 0; $i < $parametersCount; $i++) {
            $boundName = "param$i";
            $$boundName = $parameters[$i];
            $boundNames[] = &$$boundName;
        }
        $statement->bind_param(...$boundNames);
    }