MySQL Forums
Forum List  »  PHP

Re: Verifying Ownership on INSERT for Many-to-Many
Posted by: Peter Brawley
Date: March 07, 2006 07:36AM

Perhaps something like ...

SELECT ic.itm_id
FROM users u
INNER JOIN items AS i USING (acc_id)
INNER JOIN item_categories AS ic USING (itm_id)
INNER JOIN categories AS c USING (cat_id)
WHERE u.acc_id=<current user's account id)
AND c.cat_id=<desired category>

PB

Options: ReplyQuote


Subject
Written By
Posted
Re: Verifying Ownership on INSERT for Many-to-Many
March 07, 2006 07:36AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.