title: Check if an user exist in my database with Node and MySQL
body: <p>This is my <a href="https://codesandbox.io/s/confident-dew-iyihk?file=/server/controller/user.controller.js" rel="nofollow noreferrer">sandbox</a> in the server folder there is the back-end while the front-end is in the src one. I'm using React.js and Node.js.
  Let's go to the point, I use Auth0 for authentication,I want to use Auth0's <code>user_id</code> to register users in my database in order to retrieve and update their information: e-mail, name, surname.</p>
  <p>With Auth0 <code>sub</code> claim it's used to get the user_id. I would like to first check if the <code>sub</code> property is present in my MySQL database if true update user info with that <code>sub</code> else create new user record.</p>
  <p>For example. johnsmith@gmail.com with sub: id1234 submit form</p>
  <pre><code>if(id1234 exist in database) {
  update info;
  } else {
  create new user record;
  }
  </code></pre>