title: Differ between values from different tables in mysql
body: <p>I have two tables in mysql that contain details about users such as email, first name and last name.</p>
  
  <p>and I made a way to welcome the user that login but the problem is that some value in the two tables are similar which cause duplication,
  and I want to know how to differ between values from different tables.</p>
  
  <p>I tried this code but it didn't work:</p>
  
  <pre><code>$query=  "SELECT * FROM Table1 WHERE email = '".$_SESSION['Email']."' NOT IN (SELECT email = '".$_SESSION['Email']."' FROM Table2)";  
  </code></pre>