title: Where do I need to use backticks or quotes in my MYSQL query?
body: <p>I am trying to run the following query, but I am not sure if my 's should be `s or not, $form_id = the record's column , $user_id is the primary key of the record called cf_id .</p>
  
  <p>$querydate is going to be echo'd later on in the script, as it pulls the date from the record that equals to $form_id and $user_id .</p>
  
  <pre><code>$querydate = mysql_query("SELECT '$form_id' FROM email_history WHERE cf_id = '$user_id'") or die(mysql_error());
  </code></pre>
  
  <p>EDIT >>>>>></p>
  
  <p>After trying some of the solutions below, it seems to work ok, but instead of getting the date stored under the form name, I am getting this echo'd instead, so im not sure whats happening now :
  :Resource id #120
  :Resource id #121
  :Resource id #122
  :Resource id #123</p>
  
  <p>The table is setup like the followng:</p>
  
  <pre><code>[USER_ID] [FORM_ID1212212]  [FORM_ID1212112]  
   [1]      [2-1-2012]        [2-1-2012]       
   [2]      [1-1-2012]        [1-1-2012]       
  </code></pre>