4.0.18-standard-log I have a table cart and a table products
Key is as follows: products.id = cart.prod_id The problem I have is we have decided to store the users cart, so when they come back it is still in the same state they left it. Pretty usual stuff so far. Two things can possible happen that would make this bad: 1) product has been deleted 2) product has been disabled. Just before I am checking the user out, I want to fix this scenario with a delete statement. What I need to do is: DELETE FROM cart where cart.prod_id does not exist in the products table, or where 'online' = 0. There is a user_id that I match on as well, but that does not entirely matter to this question. Deleting where online = 0 is simple, but deleting where there is a lack of a matching product has me stumped. -- ------------------------------------------------------------- Scott Haneda Tel: 415.898.2602 <http://www.newgeo.com> Novato, CA U.S.A. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]