title: MySQL: fetching a null or an empty string
body: <p>I know whats the difference between a <code>NULL</code> value and an empty string (<code>""</code>) value, but if I want to get a value by using the <code>OR</code> keyword, I get no result for a <code>NULL</code> value</p>
  
  <p>The table i want to query looks like this:</p>
  
  <pre><code> titles_and_tags
  +----+----------+------+
  | id | title    | tag  |
  +----+----------+------+
  |  1 | title1   | NULL |
  |  2 | title2   | tag1 |
  |  3 | title3   | tag2 |
  |  4 | edit     | NULL |
  |  5 | rowdata  | div  |
  +----+----------+------+
  </code></pre>
  
  <p>The query i use looks like this:</p>
  
  <pre><code>select * 
    from `titles_and_tags` 
   WHERE `title` LIKE "title%" 
     AND `tag` = "tag1" OR `tag` IS NULL
  </code></pre>
  
  <p>So i want to get here a rows (id: 1,2), BUT this results 0 rows. What have i done wrong?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>Sorry, i forgot thats my main problem is this:</p>
  
  <pre><code>select * 
    from `titles_and_tags` 
  WHERE `title` LIKE "title%" 
  AND `tag` = "tag1" OR `tag` LIKE '%'
  </code></pre>
  
  <p>So this more like an off-topic, sorry</p>