The following query isn’t working for me. Can someone tell me what I’m doing wrong:
DELETE FROM
gs_shipments AS s,
gs_waypoints AS w
WHERE
s.tracking_number = '157026850207366'
AND s.is_offset =0
AND s.shipment_id = w.shipment_id
AND s.user_id =119
Refer to the multi-table DELETE syntax in the manual:
http://dev.mysql.com/doc/refman/5.0/en/delete.html
You need to specify which table’s rows you want to delete before the FROM clause.
Does this mean:
DELETE
s,
w
FROM
gs_shipments AS s,
gs_waypoints AS w
WHERE
s.tracking_number = '157026850207366'
AND s.is_offset =0
AND s.shipment_id = w.shipment_id
AND s.user_id =119
is the right syntax?
If you want to delete all rows in tables s and w matching those conditions