title: How to implement a Keyword Search in MySQL?
body: <p>I am new to SQL programming.</p>
  
  <p>I have a table job where the fields are <code>id</code>, <code>position</code>, <code>category</code>, <code>location</code>, <code>salary range</code>, <code>description</code>, <code>refno</code>.</p>
  
  <p>I want to implement a <strong>keyword search</strong> from the front end. The keyword can reside in any of the fields of the above table.</p>
  
  <p>This is the query I have tried but it consist of so many duplicate rows:</p>
  
  <pre><code>SELECT
      a.*,
      b.catname
  FROM
      job a,
      category b
  WHERE
      a.catid = b.catid AND
      a.jobsalrange = '15001-20000' AND
      a.jobloc = 'Berkshire' AND
      a.jobpos LIKE '%sales%' OR
      a.jobloc LIKE '%sales%' OR
      a.jobsal LIKE '%sales%' OR
      a.jobref LIKE '%sales%' OR
      a.jobemail LIKE '%sales%' OR
      a.jobsalrange LIKE '%sales%' OR
      b.catname LIKE '%sales%'
  </code></pre>