Php Mysqli:如何在一个查询中删除多个条目

时间:2017-08-14 05:34:23

标签: php sql

如何组合这两个查询:

$deletetix = mysqli_query($conn, "DELETE FROM presale WHERE PID = '$codeID'");
$deleteorder = mysqli_query($conn, "DELETE FROM oc_customer_ohistory WHERE order_date = '$todaydate'");

进入一个查询,以便提高效率

1 个答案:

答案 0 :(得分:0)

DELETE t1, t2 FROM t1, t2 WHERE t1.id = t2.id;