Jump to content

[SOLVED] 3 Character Search Failure


ripcurlksm

Recommended Posts

Can anyone help me figure out why this MySQL query is not returning any results when a three-letter search or smaller is tried (ie- "red" or "cat")

 

This search is suppose to be a VERY BROAD keyword search if anyone can suggest an improvement I would appreciate it:

SELECT u.id
     , u.username
 , p.user_id
 , p.report_id
     , r.id
     , r.company 
     , r.description
     , r.market1
     , r.market2
     , r.market3
     , r.market4
     , r.market5
     , r.market6
     , r.location
     , r.date_year
     , r.date_month
     , r.source
     , r.video
     , r.audio
     , r.pp
     , r.execsum
     , r.report_url
     , r.exec_url	  
  FROM user as u
INNER
  JOIN user_reports as p
    ON p.user_id = u.username
INNER
  JOIN emt_report as r
    ON r.id = p.report_id
WHERE username = '$username' AND MATCH(r.company, r.description, r.market1, r.market2, r.market3, r.market4, r.market5, r.market6, r.source) AGAINST ('%$P_search*%' IN BOOLEAN MODE) ORDER BY date_year DESC, date_month DESC, company ASC

Link to comment
https://forums.phpfreaks.com/topic/50601-solved-3-character-search-failure/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.