title: If 'no results' echo...?
body: <p>I have a basic form to filter a database. The first section works like a dream:</p>
  
  <pre><code>$result=$dbh-&gt;prepare("SELECT * FROM performers WHERE accent='$txt_accent' AND hair='$txt_hair' AND gender='$txt_gender' AND location='$txt_location'");
  
  
  $result-&gt;execute();
  
  echo '&lt;table&gt;&lt;tr&gt;&lt;th&gt;id&lt;/th&gt;&lt;th&gt;name&lt;/th&gt;&lt;/tr&gt;';
  
  while($row=$result-&gt;fetch())   {
  
  
  echo '&lt;tr&gt;&lt;td&gt;'.$row['id'].'&lt;/td&gt;&lt;td&gt;'.$row['name'].'&lt;/td&gt;&lt;/tr&gt;';
  
                                                      }
  echo '&lt;/table&gt;';
  </code></pre>
  
  <p>But I can not get the php to echo out "No results" if there are no matches.  At the moment I am trying variations of the following after the query:</p>
  
  <pre><code>if ($result= FALSE) {
  echo 'No results';
      }
  </code></pre>
  
  <p>Any ideas?</p>