Jump to content

Deleting two mysql table with php


rcouser

Recommended Posts

Hello i am trying to delete from two table with the following query

DELETE FROM product_items
JOIN cables_specification ON ( product_items.product_item_id = cables_specification.product_item_id )
WHERE product_items.product_item_id = 1

But I just get this error

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '* FROM product_items JOIN cables_specification ON ( product_items.product' at line 1

Weird because i can use

SELECT *
FROM product_items
JOIN cables_specification ON ( product_items.product_item_id = cables_specification.product_item_id )
WHERE product_items.product_item_id = 1

Link to comment
https://forums.phpfreaks.com/topic/143698-deleting-two-mysql-table-with-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.