gpt4 book ai didi

jquery - PHP Mysql 发现错误

转载 作者:行者123 更新时间:2023-11-29 13:19:41 26 4
gpt4 key购买 nike

如何查找此代码是否有错误?这是我的代码。提前致谢!

else if(isset($_POST['UPDATECSSGOLD']))
{

$stmt = $mysqli->prepare("UPDATE css set STYLE_STATUS = 'allnull'");
$stmt->execute();

$stmt = $mysqli->prepare("UPDATE css set STYLE_STATUS = 'selected' where STYLE_NAME='GOLD'");
$stmt->execute();

mysqli_close($con);
}

我正在使用ajax发送查询,这里是我的AJAX代码

<script>
function UPDATECSSGOLD()
{
$.post('insert_home.php',{
UPDATECSSGOLD:'selected'}).done(function(data){
alert ('THEME SUCCESSFULLY CHANGED!');
});

}
</script>

最佳答案

您可以实现exceptions

try
{
//your code
}
catch (Exception $e)
{
echo $e->getMessage(); //or some value to capture in javascript later
}

关于jquery - PHP Mysql 发现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21020380/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com