我不明白......为什么在这里警告?我检查了数据库,一切看起来都不错......有人可以帮助我做错了什么......
<?php
include_once('connection.php');
$sql = "SELECT username, foodlimit FROM users";
$result = mysqli_query($conn, $sql);
while($Red = mysqli_fetch_assoc($result))
{
$username = $Red['username'];
$foodlimit = $Red['foodlimit'];
$foodlimit = $foodlimit + 1;
$sql = "UPDATE users SET foodlimit = '$foodlimit' WHERE username = '$username'";
$result = mysqli_query($conn, $sql);
}
?>
编辑#1:我尝试了所有我在stackoverflow上找到的东西,没有什么事情无法帮助我......