Multiple column->value searches

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
LiveFree
Forum Contributor
Posts: 258
Joined: Tue Dec 06, 2005 5:34 pm
Location: W-Town

Multiple column->value searches

Post by LiveFree »

Hello,

Is there a way to search more than 1 column with 1 search text in a FULLTEXT column?

For example is there a proper way of doing the equivilant of this:

SELECT * FROM music WHERE MATCH(id, title, genre) AGAINST(1, 'hahah', 'Rock')

Thanks
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

nope.
LiveFree
Forum Contributor
Posts: 258
Joined: Tue Dec 06, 2005 5:34 pm
Location: W-Town

Post by LiveFree »

Damn,

Ok then is there a way to effeciantly co-allesse the results from the searches so I get a good search result?

Like combining the results from these:

SELECT title FROM music WHERE MATCH(title) AGAINST ($title)
SELECT genre FROM music WHERE MATCH(genre) AGINST ($genre)
x2

Thanks feyd
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

hint: match() .. and match() .. and match() ..
LiveFree
Forum Contributor
Posts: 258
Joined: Tue Dec 06, 2005 5:34 pm
Location: W-Town

Post by LiveFree »

You can use more than 1? Awsome!
Post Reply