سؤال

I've been away from MySQL for quite some time and I don't know what I'm doing wrong here. I got a simple query where I need to use FULLTEXT search:

SELECT * FROM post WHERE MATCH ( title, content ) AGAINST ( 'Pytho*' )

it doesn't return anything even though I got a lot of posts with Python in the title or content. If I go with full word it works:

SELECT * FROM post WHERE MATCH ( title, content ) AGAINST ( 'Python*' )

هل كانت مفيدة؟

المحلول

try this

 SELECT * FROM post 
 WHERE MATCH ( title, content ) AGAINST ( 'Python' IN BOOLEAN MODE )

DEMO HERE

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top