title: PHP PDO fetch null
body: <p>How do you check if a columns value is null? Example code:</p>
  
  <pre><code>$db = DBCxn::getCxn();
  
  $sql = "SELECT exercise_id, author_id, submission, result, submission_time, total_rating_votes, total_rating_values
  FROM submissions 
  LEFT OUTER JOIN submission_ratings ON submissions.exercise_id=submission_ratings.exercise_id
  WHERE id=:id";
  
  $st = $db-&gt;prepare($sql);
  
  $st-&gt;bindParam(":id", $this-&gt;id, PDO::PARAM_INT);
  
  $st-&gt;execute();
  $row = $st-&gt;fetch();
  
  $this-&gt;total_rating_votes = $row['total_rating_votes'];
  
  if($this-&gt;total_rating_votes == null) // this doesn't seem to work even though there is no record in submission_ratings????
  {
  ...
  }
  </code></pre>