title: ER_PARSE_ERROR: You have an error in your SQL syntax
body: <p>I am trying to select a row in mysql where my variable req.body.email is found in the column Email_Address
  this is my code snippet</p>
  
  <p>app.post('/login', function(req, res){</p>
  
  <pre><code>con.query("select * from people where Email_address= "+ req.body.email, (err, res) =&gt; {
      if(err) {
          console.log('the email '+ req.body.email +'does not exist in the database');
          throw err;
      }
      else{
          console.log('selected');
          if(password == req.body.password)
              //res.redirect('index', { title: 'Hey', message: 'Hello there!' });
              res.send('hello');   
      }
  
  
  
  });
  </code></pre>
  
  <p>but I am getting an error below</p>
  
  <p><strong>Error:</strong><code>ER_PARSE_ERROR: 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 '@gmail.com' at line 1</code></p>
  
  <p>Any Ideas on how to solve it</p>