Do you have a question? Post it now! No Registration Necessary. Now with pictures!
September 12, 2006, 1:54 pm
rate this thread
5*(column LIKE ' term') + 4*(column LIKE ' term')
I don't even know what it is called so it is difficult to search. My
questions is... Is the value before the * like a multiplier? So I could
give more weight to one column than another by raising that number?
I am trying to return a result that searches 5 or 6 columns and column
1 needs to have by far the most weight, 2 the second amount of weight
and so on. I thought this worked but lets say i am searching for the
word "cooking" like below
Order By 6*(book_title LIKE '%cooking"%') + 5*(book chapter LIKE
'%cooking%') + 4*(book_author LIKE '%cooking%') + 3*(book_text LIKE
'%cooking%') + 2*(book_publisher LIKE '%cooking%') +
The problem is if the word "cooking" is in the book_title once, but in
the book_text like 20 times, the book_text is returned first, i always
want the title to have more precedence even if it only contains
Thanks for any help.
- » Americanas.com SALDO de TVs Com at 80% de Desconto (29798)
- — Newest thread in » MySQL Database Forum