MD,郁闷死了,谁来帮我看看!!!
<?
require "functions.php";
?>
<?
$id = intval($id);
$sql = "select id,show_on_index from images where id=$id";
$result = mysql_query($sql) or die(mysql_errno().": ".mysql_error()."\n");
if(!$rs=mysql_fetch_assoc($result))
{
echo "此记录可能已经被删除!";
}
if($rs["show_on_index"]=0)
{
$DB->query('update images set show_on_index="1" where id=$id');
header("location:images.php");
}
else
{
$DB->query('update images set show_on_index="0" where id=$id');
header("location:images.php");
}
?>
为什么无法更新!!!