MySQL DELETE?
| From: | Thomas Angst | Date: | Tue, 07 Nov 2000 17:16:02 +0000 |
| Subject: | MySQL DELETE? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-24131@lists.php.net to get a copy of this message | ||
Hi all,
it seems a tricky one to me....
I would like to delete some records of a table where the contitions comes
from an other table. The trouble is, you can not delete if there are several
tables involved.
I try these SQL statements which both didn't worked.
DELETE xlist.* FROM xlist, xtree WHERE xlist.entry = 59 AND xtree.tablename
= 'adressen' AND xtree.id = xlist.list;
DELETE FROM xlist WHERE id = (SELECT xlist.id FROM xlist, xtree WHERE
xlist.entry = 59 AND xtree.tablename = 'adressen' AND xtree.id =
xlist.list);
Any ideas how to write a statement like these or similar?
thanks
Thomas