Hi,
I want to delete products from subcategories which are part of a main
category.
for example:
maincat
|__subcat1
| |__prod1
| |__prod2
| |__prod3
|
|__subcat2
I'm trying to write a query which deletes prod1,2,3
I tried this but it doesn't seem to work. Can anyone help?
DELETE FROM product
WHERE product.id in
(SELECT p.id
FROM product p, category c
WHERE p.cat=c.id AND c.subcatfrom=2)
thanks in advance,
Lieven Op De Beeck
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php