title: PHP How to check if MySQL result contains value
body: <p>I have the following code:</p>
  
  <pre><code>$getfreq = mysql_query("SELECT wp_term_relationships.term_taxonomy_id FROM wp_term_relationships WHERE wp_term_relationships.object_id = '1737'");
  </code></pre>
  
  <p>The above results in phpymyadmin in returning 5 values: 345 456 569 634 723</p>
  
  <p>Now, using PHP I want to check the contents of $getfreq to see if it contains 569.</p>
  
  <p>I've tried doing this:</p>
  
  <pre><code>if (in_array(569,$getfreq,TRUE) {
      echo "Success!";
  } else if (in_array(654,$getfreq,TRUE) {
      echo "Not good";
  } else {
      echo "Failure";
  }
  </code></pre>
  
  <p>But this doesn't work.</p>
  
  <p>Doing this:</p>
  
  <pre><code>print_r($getfreq);
  </code></pre>
  
  <p>Results in: Array().</p>
  
  <p>Any ideas?</p>