title: Why is this returning bool(false)?
body: <p>I have this query that checks if a movement exists and supposed to return true or false. This query</p>
  
  <pre><code>function movement_performed_today($class_id, $client_id){
  $class_id = (int)$class_id;
  $client_id = (int)$client_id;
  
  
  
  $query = mysql_query("SELECT COUNT(`movement`) FROM `completed_movements` WHERE `class_id` = '$class_id' AND `client_id` = '$client_id' AND `date` = CURDATE()");
  
  $movement_performed = mysql_fetch_assoc($query);
  
  $return = (mysql_result($movement_performed, 0) == 1) ? true : false;   
      var_dump ($return);
  }
  </code></pre>
  
  <p>Returns:</p>
  
  <pre><code>bool(false) 
  bool(false)
  </code></pre>
  
  <p>If I replace this code:</p>
  
  <pre><code>$return = result(mysql_result($movement_performed, 0) == 1) ? true : false; 
      var_dump ($return);
  </code></pre>
  
  <p>With this:</p>
  
  <pre><code>print_r ($movement_perfomed);
  </code></pre>
  
  <p>Returns:</p>
  
  <pre><code>Array ( [COUNT(`movement`)] =&gt; 2 ) 
  Array ( [COUNT(`movement`)] =&gt; 3 )
  </code></pre>
  
  <p>Am I completely wrong to think since these numbers are anything other than zero it should return true?</p>