title: How I could return or save value into a temp with a callback function in module mysql in nodejs?
body: <p>I used mysql module on npm but when I need return value when I select 1 record I can't catch it. Can you have me catch it because when I use console.log with it. I can see the value but when I use variable or return it. I just have undefine :(. </p>
  
  <p>I need return result but I can't do it is normally :(.</p>
  
  <pre><code>var selectSQL = function(accountItems) {
      con.query('call sp_compareAccount(?)', accountItems.email, function(err, result) {
          if (err) throw err;
          result[0][0]._email;
      });
  }
  </code></pre>