At 13:50 14/04/99 +0100, Magnet.Com AG wrote:
>I have two tables, one with the address and one with some features for each
>adress, something like that:
>The difficult part is to come: I want to find addresses wich have "feature
>A" and "feature B", this query does not work:
>select a_id from address where f_belong_to_addr_id = a_id and f_name
>="feature A" and f_name ="feature B"
This is OT - it's an SQL issue - not a MySQL problem.
You need to join to 2 instances of the features table:
FROM address a, features f1, features f2
AND f1.f_name ="feature A"
AND f1.f_name ="feature B";
This does not scale well to multiple searches / fuzzy matching - have a
look in the archive for keyword searching and SQL learning resources.