[thelist] MySQL: Problem with JOIN query

Joshua Olson joshua at waetech.com
Sat Feb 28 16:32:34 CST 2004


> -----Original Message-----
> From: Alexis Fellenius
> Sent: Saturday, February 28, 2004 1:29 PM
>
> My goal is to select users based on their interests.
> But I just can't get it to work!
> Example:
> I want to select the user who has chosen BOTH computers
> (interest_id = 1) AND music (interest_id = 2)

Alexis,

In order to do this you'll need to join users against user_interest_assoc
twice.  One interest will be matched off the first join and the second
interest will be matched off the second join.

Knowing that, the solution should become easier to find.

Good luck,

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com/service_areas/
706.210.0168




More information about the thelist mailing list