title: mysql table fields - Resource id #6
body: <p>I have a database (db_name=members) with a lot of fields but the relevant ones for this are:</p>
  
  <pre><code>security_question, security_answer, email
  </code></pre>
  
  <p>The php code is:</p>
  
  <pre><code>$email = $_COOKIE['site_user'];
  
  $select_sa = mysql_query("SELECT security_answer FROM members WHERE email='".$email."'");
  $result_sa = mysql_query($select_sa);
  $arr_sa = mysql_fetch_row($result_sa);
  $result2 = $arr_sa[0];
  $get_sa = $result2;
  </code></pre>
  
  <p>If I</p>
  
  <pre><code>  echo $select_sa;
  </code></pre>
  
  <p>It prints "Resource id #6" although in the table I can see the security answer as a word and not "Resource id #6".</p>
  
  <p>If I</p>
  
  <pre><code>echo $get_sa;
  </code></pre>
  
  <p>It prints nothing.</p>
  
  <hr>
  
  <p>Could you please help me to be able to read the securty_answer field from the database ?</p>
  
  <p>Thanks,
  Ray</p>