Похожие чаты

Hello. Can any one help me with FullTextSearch in MySqlDatabase

in PHP?
I Have fulltext enable in table Accounts.
Now i want to select username column with fulltext search.

I use this query:
SELECT PName
FROM accounts
WHERE MATCH(PName) AGAINST('fuas');

it should return 3 columns:
fuas
fuas2
fuas3

but it just return:
fuas


Can any one help me?

9 ответов

17 просмотров

SELECT pName FROM accounts WHERE pName LIKE %fu%

🤷‍♂

Taha- Автор вопроса
Ibroh24
SELECT pName FROM accounts WHERE pName LIKE %fu%

And how can I sort best match? for example i have this rows: [fuas12]0 [1fuas11] fuas fuas01 fuas1 it should sort this like this: fuas fuas1 fuas01 [fuas12]0 [1fuas11]

Taha- Автор вопроса
Taha
And how can I sort best match? for example i have...

Full text search should do this attomaticly, but I dont know how can I do that with LIKE query.

Taha
And how can I sort best match? for example i have...

I think the ORDER BY pName ASC will do that for you ie SELECT pName FROM accounts WHERE pName LIKE %fu% ORDER BY pName ASC

Taha- Автор вопроса
Ibroh24
I think the ORDER BY pName ASC will do that for yo...

e'mm... it doesn't help with more big examples. Its what i want exactly do.

Taha- Автор вопроса
Ibroh24
I think the ORDER BY pName ASC will do that for yo...

for example order of this 3 rows with ASCII chars is: fuas fuas01 fuas1 and with full text should be: fuas fuas1 fuas01

Taha
screenshot e'mm... it doesn't help with more big examples. I...

I've not used match() and against() before. But if what you needed is that query that will generate: fuas fuas01... The provided query should do it.

!report

Похожие вопросы

Обсуждают сегодня

Карта сайта