Hi, I have a search query that is working well. The query is using "MATCH (fields) AGAINST ($keywords IN BOOLEAN MODE)" in the WHERE clause. I need to have the search query only search about half of the field. I was thinking I could use SUBSTR within the MATCH portion of the field. As noted below...
However, I keep getting the following error...
Any suggestions in getting this accomplished?
Thanks in advance
-SM
Code:
SELECT s.articleID
FROM search_contents s
WHERE MATCH (
s.title, SUBSTR( s.abstract, 0, POSITION( "Keywords: ", s.abstract ) )
)
AGAINST (
'+breast +cancer'
IN BOOLEAN
MODE
)
LIMIT 0 , 20
However, I keep getting the following error...
Code:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'SUBSTR( s.abstract, 0, POSITION(
"Keywords: ", s.abstract
) )
)
AGAINST (
'' at line 4
Any suggestions in getting this accomplished?
Thanks in advance
-SM