title: SQL Specific Statement Query
body: <p>I am doing quite a large query to a database and for some reason it is returning many results that do not match any of my search terms. It also seems to duplicate my results so I get the same SQL item 16 times. Any ideas why?</p>
  
  <pre><code>SELECT a.*
  FROM
    j20e8_datsogallery AS a,
    j20e8_datsogallery_tags AS t
  WHERE
    (a.id LIKE "%bear%" OR
     a.imgtitle LIKE "%bear%" OR
     a.imgtext LIKE "%bear%" OR
     a.imgauthor LIKE "%bear%" OR
     t.tag LIKE "%bear%")
  ORDER BY a.id DESC
  LIMIT 0, 16
  </code></pre>
  
  <p>I think it maybe something to do with the LIKE %term% section but cannot get it working at all.</p>