I try to update my table but I give this error please help me
function updatePost($id , $title, $content, $date, $groups)
{
$connection = mysqli_connect(DataBaseManager::HOST, DataBaseManager::USER, DataBaseManager::PASSWORD, DataBaseManager::DATABASENAME);
$sqlCommand = "UPDATE posts
SET title = '$title', content = '$content', date = '$date' , groups = '$groups'
WHERE id == 1";
if ($connection->query($sqlCommand) === TRUE) {
echo "Record updated successfully";
} else {
echo "Error updating record: " . $connection->error;
}
$connection->close();
}