title: Query with three conditions
body: <p>I need to make query that will select all names and all nicknames from some table but only where id is in some array.This is The query:</p>
  
  <pre><code>SELECT n. * FROM nikovi n 
  INNER JOIN sajt_nikovi s ON n.id = s.nik
  WHERE s.sajt = '50' and     n.nadimak like '%ana%' or n.ime like '%ana%'
  </code></pre>
  
  <p>And it found all entries from table where n.ime like '%ana%', not only those for this join. does anyone have any idea?</p>