Yekver
Yekver

Reputation: 5193

MySQL MATCH for more than one field

SELECT * FROM  portfolio
INNER JOIN  translation 
ON portfolio.description =  translation.key
WHERE
  MATCH(it_translation.*) AGAINST('test')

Why this code doesn't work?

If I do like this MATCH(it_translation.field) AGAINST('test') everything is ok, but I wanna search FULLTEXT via more than one field, and I don't know how many fields in table.

Upvotes: 1

Views: 289

Answers (1)

joshuahedlund
joshuahedlund

Reputation: 1782

IIRC for FULLTEXT to work you need a FULLTEXT index that covers every field you want to use it for, so if you "don't know how many fields in table" you won't be able to MATCH it like that.

Upvotes: 3

Related Questions