我已经看过并且无法告诉我的错误在哪里如果有人看到我看不到的东西你能指出我正确的方向来解决这里是我的代码
$con=mysqli_connect("localhost", $user_name, $password, $database_name);
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$result = mysqli_query($con,"SELECT * FROM `$table_name` WHERE energy < 30");
while($row = mysqli_fetch_array($result))
{
$newenergy = $row['energy'] + 1;
mysqli_query($con,"UPDATE $table_name SET energy = $newenergy WHERE uuid =$row['uuid']");
}
enter code here
mysqli_close($con);
?>