[英]mysql delete query with condition
我有這個查詢..在多個表中刪除..但是如果某個字段在任何表中都沒有內容,它不會刪除任何內容
$sql = " DELETE
property,
unit,
maintenance,
report,
owner
FROM
property,
unit,
maintenance,
report,
owner
WHERE
property.id = '".$_REQUEST['property']."'
AND
unit.property = property.id
AND
unit.id = maintenance.unitid
AND
report.maintenance = maintenance.id
AND
property.id = owner.property
";
所以,我可以在查詢中使用什么條件來跳過此問題..
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.