title: In SQL/PHP, using SELECT statement in the exec function issue
body: <p>I am making an email validation form for my website, and I need to check if an email (stored in the variable <code>$email</code>) and a key (var <code>$key</code>) correspond to a row in the table '<code>confirm</code>' of my database.</p>
  
  <p>So here is the code:</p>
  
  <pre><code>$check_key = $bdd -&gt; exec("SELECT * FROM confirm WHERE 'email' = '$email' AND 'key' = '$key' LIMIT 1") or die(mysql_error());
  </code></pre>
  
  <p>To check if <code>$chek_key</code> has been filled up with the row in question, I try to display its content with:</p>
  
  <pre><code>while ($datas= $check_key-&gt;fetch()){
          echo $data['key'];}
  </code></pre>
  
  <p>But nothing appears...</p>
  
  <p>I also tried to change the quotes in the request, like this:</p>
  
  <pre><code>$check_key = $bdd -&gt; query("SELECT * FROM confirm WHERE 'email' = '$email' AND 'key' = '$key' LIMIT 1") or die(mysql_error());
  </code></pre>
  
  <p>But I get this error:</p>
  
  <blockquote>
    <p>Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '@hotmail.com AND 'key' = 43a1e442c3efdd259102f5d80af87e9c LIMIT 1' </p>
  </blockquote>
  
  <p>I'm stuck here, do you have any idea ?</p>
  
  <p>Thanks</p>