Hello,

I would like to do a FULLTEXT search across two tables.  I run an artist 
website, so I need to search across the user list and the users' associated 
art pieces list. I've come up with this query (fulltext indexes for these 
precise values have been created on both tables):

SELECT * from users INNER JOIN art ON (users.user_id = art.user_id)
WHERE MATCH (nickname, name_first, name_last, name_middle, city, state, 
zip_area, country, bio_short, bio_desc) AGAINST ('kansas')
OR MATCH (title, medium, commentary) AGAINST ('kansas');

This query is very close to what I need, except that it returns redundant 
rows.  For example, if users.state='kansas' it returns every record from art 
where users.user_id=art.user_id.  How do I return records that have 'kansas' 
in either users, or art, or both, only once? I think a UNION might help me 
here, but my provider uses MySQL v.3.22 so that is not an option...

I apologize if I am not being clear about something ... If you need more 
detail I would be happy to provide it.

Thanks,
-- 
Ladd J. Epp

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to