Re: mysql query question (images,tags)

2006-11-09 Thread Jens Kleikamp
Jens Kleikamp schrieb: hi to all, I have a simple question/szenario. Here are my tables: 1. image (id, name) 2. tag (id, name) 3. images_tags (image_id, tag_id) At the moment I have the following working query, it selects all images which have *at least one of the tag ids* (25,30) assigned.

Re: MySQL query question

2005-12-24 Thread Peter Brawley
Josh, >I have several tables, all with many-to-many joining tables. > users > users_teams > teams > teams_projects > projects Once again explicit join syntax clarifies matters: SELECT DISTINCT username FROM users INNER JOIN users_teams ON (users.id = users_teams.user_id) INNER JOIN teams ON

Re: MySQL query question

2005-12-24 Thread Hank
>since I'm not sure how users would > ever be directly associated with teams - I would have expected to find > players to be associated with teams - so forgive me if this doesn't > resemble very much what you're doing: Think corporate projects, not sports. Here's my take on the original query.. y

RE: MySQL query question

2003-11-07 Thread Andy Eastham
Chris, You're almost there! select * from temp where col2 like concat('%',col1, '%'); Andy > -Original Message- > From: Chris A. Mattingly [mailto:[EMAIL PROTECTED] > Sent: 07 November 2003 17:01 > To: [EMAIL PROTECTED] > Subject: MySQL query question > > > I've searched around on the li