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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.