Re: Rating results after relevance. Difficult problem
| From: | Sven Herrmann | Date: | Thu, 09 May 2002 10:02:00 +0000 |
| Subject: | Re: Rating results after relevance. Difficult problem | ||
| References: | 1 2 3 | Groups: | php.db php.general |
| Request: | Send a blank email to php-db+get-19071@lists.php.net to get a copy of this message | ||
> First I did try to add
> where results != 0
> but the db does not know about the results row
simply use
select news.id, if (news.text_short like '%test%', 50, 0) + if (user.name
like '%woodoo%', 50, 0) as rating from news, user where user.id =
news.creator HAVING rating > 0 order by rating DESC;
Sven