LIKE and JOIN
Posted by:
Lksk Lksk
Date: February 08, 2017 04:09PM
I have 2 tables - GOODS and KEYWORDS.
In GOODS:
id
title
description
rate
In KEYWORDS:
id
goods_id
keyword
By using LIKE and JOIN for searching for a word in the TITLE, DESCRIPTION and in the KEYWORD I would like to use sorting BY RATE,
and if the word will in the TITLE, DESCRIPTION and in the KEYWORD, then I need to give +100 points to RATE, BUT I DON'T WANT UPDATE A RATE FIELD.
If the word will in the TITLE and in the KEYWORD then I need to give +50 points to RATE.
If the word is in the DESCRIPTION and in the KEYWORD then to give +30 points to RATE.
If the word is in the DESCRIPTION or in the TITLE then to give +10 points to RATE.
Please help to do the mysql query.
Subject
Written By
Posted
LIKE and JOIN
February 08, 2017 04:09PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.