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?
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]
Full text search should do this attomaticly, but I dont know how can I do that with LIKE query.
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
e'mm... it doesn't help with more big examples. Its what i want exactly do.
for example order of this 3 rows with ASCII chars is: fuas fuas01 fuas1 and with full text should be: fuas fuas1 fuas01
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
Обсуждают сегодня