Why is it that when I run this script that shifts database values, it gives me errors?
<?php
$connection = mysqli_connect('localhost', 'root', '', 'pointsmanager');
$script="UPDATE points_history
SET
7d_before = 6d_before,
6d_before = 5d_before,
5d_before = 4d_before,
4d_before = 3d_before,
3d_before = 2d_before,
2d_before = 1d_before,
1d_before = (
SELECT
today_points
FROM
points
)
"
mysqli_query($connection, $script);
?>
I get
Parse error: syntax error, unexpected 'mysqli_query' (T_STRING) in C:\xampp\htdocs\demo\argon-dashboard-master\CronScript.php on line 18
Thanks!