Reputation: 1763
I have a firstname and a surname field in my mysql table. And i dont know in which order a user enters the firstname and surname in ONE field. My fulltext index is on PERSONEN_VNAME and PERSONEN_NAME So he can write "tester a" or "a tester".
I got these two persons:
I tried this query:
SELECT PERSONEN_ID,PERSONEN_VNAME, PERSONEN_NAME FROM
PATIENT WHERE match(personen_name,personen_vname) against
('+tester* +a* ' IN BOOLEAN MODE)
The query returns me just TESTER Andrea but not Tester A.
Why!?
EDIT: sql fiddle: http://sqlfiddle.com/#!2/21f29/1
Upvotes: 0
Views: 97
Reputation: 4268
Use this:-
SELECT PERSONEN_ID,PERSONEN_VNAME, PERSONEN_NAME FROM
PATIENT WHERE match(personen_name,personen_vname) against
('+tester* +a% ' IN BOOLEAN MODE)
See this fiddle
Upvotes: 1