Answer the question
In order to leave comments, you need to log in
Why isn't updating correctly in PHP PDO database?
The data in the database is not updated correctly.
public function updateRow($query = null, $params = [])
{
$result = $this->link->prepare($query);
$result->execute($params);
}
$db->updateRow('UPDATE ' . Config::DB_TABLE . ' SET `User` = :User WHERE `id` = :id', [
'id' => $row['id'],
'User' => $User
]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question