页面更改的SQL UPDATE

im using PDO SQL to connect, connection is success, but this..

<?php
include 'db.php'; // Call SQL
$page = 'soon'; // Unique ID
$db = "UPDATE views 
       SET num = num + 1 
       WHERE page = '$page'";
?>

does not work

If I check the values in the database, num is unchanged.

This code is doing literally nothing. To have a query executed, you have to run it against a database. Besides, you should never ever add a variable directly to the query but only through a parameter:

<?php
include 'db.php'; // Call SQL
$page = 'soon'; // Unique ID
$stmt = $db->prepare("UPDATE views SET num = num + 1 WHERE page = ?"); // instead of $page
$stmt->execute([$page]); // here goes $page