0

What I expect to do is: when user search for any term, depending upon the content, sql query should return list of maximum occured words.

For example:

Table schema: tbl_product (id, title, content)

Search term: car

Expected output depending upon content:

  1. car (100)
  2. cars (75)
  3. card (50)
  4. carpenter (20)
  5. cargo (15)

EDIT

The main intention here is to return keywords matched by the expression.

TheManish
  • 183
  • 1
  • 15
  • Sorry @ajreal but I don't think its a duplicate. because what I want to return is not just the count of appearance but also the matched keywords as well. Can you please have a look at it once again. Thanks – TheManish Jun 29 '17 at 07:28

1 Answers1

0
SELECT tb.carname FROM tbl_product tb WHERE tb.carname LIKE '%car%'
  • A code only answer is not high quality. Please edit your answer to annotate your code, explain why and how it solves the problem, and link to any relevant documentation. – Stephen Ostermiller Jun 29 '17 at 12:23