Fatal error: Uncaught PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? SET ? WHERE id=?' at line 1 in D:\OpenServer\domains\ngs.local\vendor\ikudryash\Core\Database\Query.php:132 Stack trace: #0 D:\OpenServer\domains\ngs.local\vendor\ikudryash\Core\Database\Query.php(132): PDO->prepare('UPDATE :tablena...') #1 D:\OpenServer\domains\ngs.local\vendor\ikudryash\Core\Database\Record.php(58): ikudryash\Core\Database\Query->updateRow(3, Array) #2 D:\OpenServer\domains\ngs.local\app\controllers\ArticleController.php(18): ikudryash\Core\Database\Record->update(Array) #3 [internal function]: app\controllers\ArticleController->actionCreate() #4 D:\OpenServer\domains\ngs.local\vendor\ikudryash\Core\Router.php(85): call_user_func_array(Array, Array) #5 D:\OpenServer\domains\ngs.local\vendor\ikudryash\Core\Router.php(47): ikudryash\Core\Router::executeAction() #6 D:\OpenServer\do in D:\OpenServer\domains\ngs.local\vendor\ikudryash\Core\Database\Query.php on line 132
Собственно это то, что я получаю в ответ. Вот сам запрос
$query = "UPDATE :tablename SET :params WHERE id=:id"
$prepare = $this->connection->prepare($query);
$prepare->bindValue(':tablename', static::table());
$prepare->bindValue(':params', $params);
$prepare->bindValue(':id', $id);
try {
$result = $prepare->execute();
} catch (\PDOException $e) {
echo $e->getMessage();
die;
}
В чем проблема не могу понять, если кто поможет, буду очень благодарен.