I have two tables:
table "data"
 id        int(11) NOT NULL AUTO_INCREMENT,
 name      varchar(200),
 remark    varchar(200),
table "tags"
 id        int(11) NOT NULL AUTO_INCREMENT,
 macro     varchar(200),
 value     varchar(200),
 data_id   int(11)
One entry in "data" can have zero or more entries in "tags" which are connected by "data_id" (reference to "data.id").
Now I want to search for all entries in "data" with some WHERE condition from both tables (entries that also a match in tags key/value).
SELECT data.id,data.name 
FROM data,tags 
WHERE (data.name LIKE ?) 
   or (data.remark LIKE ?) 
   or (tags.value LIKE ?) ...
How to do this nested query?
THANKS
 
     
    