1 回答
TA贡献1797条经验 获得超6个赞
您可以尝试使用数组和 foreach,如下所示:
$sql_querys = [
"UPDATE esports2013skins SET FAMASDoomkitty='$Famas_Doomkitty_mn' WHERE id=2",
"UPDATE esports2013skins SET FAMASDoomkitty='$Famas_Doomkitty_ft' WHERE id=3",
"UPDATE esports2013skins SET FAMASDoomkitty='$Famas_Doomkitty_mnst' WHERE id=7",
"UPDATE esports2013skins SET FAMASDoomkitty='$Famas_Doomkitty_ftst' WHERE id=8"
];
foreach($sql_querys as $sql){
if ($conn->query($sql) === TRUE) {
echo "Record updated successfully";
} else {
echo "Error updating record: " . $conn->error;
}
}
- 1 回答
- 0 关注
- 143 浏览
添加回答
举报