谁能告诉我为什么它不更新mysql查询,javascript执行,所有的工作,但它只是不更新到表帐户和行“积极”。
行值应为“1”
有谁能修好它吗THanks
<script>
function positive(accid)
{
top.document.location.href = "myaccounts.php?job=positive&positive="+accid;
}
</script>
<?php
if(isset($_GET["job"]) && $_GET["job"] == "positive" && !empty($_GET["positive"]))
{
$account_id = mysql_real_escape_string($_GET["account_id"]);
mysql_query("UPDATE `accounts` SET `positive`= '1' WHERE account_id = '$account_id'");
}
?>
<td class="formstyle"><div align="center" style="padding:5px;">
<img src="" width="35" height="35" style="cursor: pointer;" onclick="if(confirm(\'Confirm Positive Feedback ?\')) positive(\''.$row["account_id"].'\');" /></div>
</td>
发布于 2017-02-21 06:11:47
您的SQL语法错误,应连接$account_id。
https://stackoverflow.com/questions/42354997
复制相似问题