in reply to Re: [OT] Weighted Search Results
in thread [OT] Weighted Search Results
Brilliant idea. I poped into MySQL Control Center and discovered two things. You need parenthesis around the whole forumula and then you also need to use having instead of where. Where wont work with column aliases and having will.
SELECT *, ((State = 'CA') + (City = "Chico")) AS score FROM `Address +` HAVING score > 0 ORDER BY score DESC
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: [OT] Weighted Search Results
by CiceroLove (Monk) on May 20, 2004 at 17:36 UTC | |
by eric256 (Parson) on May 20, 2004 at 17:56 UTC |