[code=php]$query = “SELECT artist,lyric,title,album,
MATCH(artist) AGAINST (‘$trimmed’ IN BOOLEAN mode) AS score1,
MATCH(album) AGAINST (‘$trimmed’ IN BOOLEAN mode) AS score2,
MATCH(title) AGAINST (‘$trimmed’ IN BOOLEAN mode) AS score3,
MATCH(lyric) AGAINST (‘$trimmed’ IN BOOLEAN mode) AS score4
FROM lyrics
WHERE
MATCH(artist, album, title, lyric) AGAINST (‘$trimmed’ IN BOOLEAN mode) ORDER BY score1,score2,score3,score4″;
I am trying to get these to order by order of importance… Where artist ranks higher than album which is higher than title, which is above lyric. I just can’t get this to work.
Someone told me to do this when using the above SQL:
[QUOTE]
In the PHP calculate $score as ($score1 * 4) + ($score2 * 2) + ($score4
But I don’t understand what he means by this.
Could someone help me out?