title: How to handle ADOdb Execute return value
body: <p>I've found several tutorials which have similar code like the following:</p>
  
  <pre><code>   $sql = "select * from users";
  
     $result =  $conn1-&gt;Execute($sql);
  
     if ($result==false) {
        print 'error' . $conn1-&gt;ErrorMsg() . '&lt;br&gt;';
     } else {   
        print_r($result-&gt;GetRows());          
     }
  </code></pre>
  
  <p>But how can $result ever be false? If I add a where clause which can not be fulfilled the else-branch is still taken since $result contains the column titles. <strong>Examples:</strong></p>
  
  <pre><code>"select * from users"; // Select the whole table data
  echo "$result";
  </code></pre>
  
  <p>leads to </p>
  
  <pre><code>id,username,password 1,peter,geheim 2,sabine,secret 3,thorsten,qwertz 
  </code></pre>
  
  <p>Whereas </p>
  
  <pre><code>"select * from users where username = 'does not exist'";
  echo "$result";
  </code></pre>
  
  <p>leads to </p>
  
  <pre><code>id,username,password
  </code></pre>
  
  <p>Therefore result is never false. What is my mistake here?</p>