我有这段代码:
$check = mysql_query("SELECT * FROM items WHERE id='$id'");
$checknum = mysql_num_rows($check);
if($checknum==1)
{
mysql_query("DELETE * FROM items WHERE id= '$id' ") or die("mysqlerror");
echo "OK";
}
答案 0 :(得分:1)
删除星号。
mysql_query("DELETE FROM items WHERE id= '$id' ") or die("mysqlerror");