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
In reply to Re: Re: [OT] Weighted Search Results
by eric256
in thread [OT] Weighted Search Results
by CiceroLove
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |