Thank you for your question about sorting by keyword density ~ Php mysql apache
This is probably the case.
Table to be searched
Id title url content
-------------------------------------------------------------
0 la http: // a r3453
1. have a drink. http: // B 34543
2. la fun http: // c 435345
You only need to search for the title field.
For example, I search for "Eat, drink, and play"
The result is as follows: (match multiple keywords to the front)
Have fun
Drinking and eating...
La la
Thank you so much for your advice ~ Thank you.
Reply to discussion (solution)
I forgot to talk about how to write SQL statements ~
We recommend that you do not use SQL. use sphek (Coreseek) to meet your needs and sort by weight. Here: http://www.coreseek.cn/
Sphinx knows this thing, because I am not a pure programmer, and I am not very familiar with the program.
Is it a bit cool to use this ~
Now, your function is not a chicken, but a cow. When the number of concurrency comes up, this is implemented using SQL, and your database may not be able to resist it.
It seems very troublesome to say something about Sphinx.
Mysql full-text index