title: mySQL & PDO - SELECT WHERE user IS NULL and user = :user
body: <p>I need to be able to retrieve the table rows that are Null or have the bound user name. Can someone explain the correct sql statement?</p>
  
  <pre><code>$value = $db_site-&gt;prepare('SELECT * FROM tablename WHERE user IS NULL AND user = :user');
  $value-&gt;bindValue(':user', $user, PDO::PARAM_STR);
  $value-&gt;execute();
  </code></pre>
  
  <p>If it matters the retrieved info is then sent through a for loop.</p>