使用where和or删除
我有一个[id,first,second,third]包含很多条目的数据库表,当我[first,second,third]为空时,我想删除所有条目。
我可以使用WHERE和OR吗?
这是我要使用的代码。但是,它可能会显示一些错误:
$sql= "delete * from mytable where first='' or second='' or third=''";mysql_query($sql) or die("query failed: $sql".mysql_error());
回答:
您不需要*此语句。
$sql= "delete from mytable where first='' or second='' or third=''";以上是 使用where和or删除 的全部内容, 来源链接: utcz.com/qa/410891.html

