title: Get results from mysql query into an integer array?
body: <p>I am using a php embedded mysql query as follows:</p>
  
  <pre><code>$query_sample = mysql_query(" 
  SELECT left FROM sampleTable WHERE right  = 1 
  UNION 
  SELECT right FROM sampleTable WHERE left  = 1 
  ");
  </code></pre>
  
  <p>where both the "right" and "left" columns are integers.</p>
  
  <p>After this query is executed I want the result set to be assigned into an integer array in php.
  Is there an effecient approach to converting the results of a query into an integer array??</p>
  
  <p>QUESTION:</p>
  
  <p>I basically want to be able to ask the question: "Is $x in $results_array" after the results set from the query has been assigned to $results_array and $x is any integer.</p>
  
  <p>Any help appreciated guys....</p>