title: Query Duplicating the outcome
body: <p>i am trying to select data from to table bast on column on thes tow table but i get duplicating data</p>
  
  <p>table 1: ID P_name  Image_url   cat_number  Price   Foe T_email loc_a   loc_o</p>
  
  <p>table 2 : n_p   Name    Email   Password    Phone   Location_lat    Location_long<br>
  i jut wont only the wont to select when T_email= trader.Email</p>
  
  <p>and it get all trader.Email in table 2</p>
  
  <pre><code>&lt;?php
  
  
  $host='127.0.0.1';
  
  
  $username='root';
  $pwd='123';
  
  
  $db="catcher_database";
  
  
  
  $con=mysqli_connect($host,$username,$pwd,$db) or die('Unable to connect');
  
  
  $email = $_POST['email'];
  $interrest_a=$_POST["interrest_a"];
  $interrest_b=$_POST["interrest_b"];
  $interrest_c=$_POST["interrest_c"];
  $interrest_d=$_POST["interrest_d"];
  //$interrest_e=$_POST["interrest_e"];
  $interrest_e="Restaurants";
  if(!empty($email)){
  
  if(mysqli_connect_error($con))
  {
      echo "Failed to Connect to Database ".mysqli_connect_error();
  }
  
  
  
  
  $sql="SELECT * FROM product,trader WHERE trader.Email=product.T_email and product.T_email = '$email'";
  
  
  
  
  $result=mysqli_query($con,$sql);
  
  
  if($result)
  {
      while($row=mysqli_fetch_array($result))
      {
          $data[]=$row;
      }
  
  
  
  
      print(json_encode($data)); }
  }
  else
  {
  
  if(mysqli_connect_error($con))
  {
      echo "Failed to Connect to Database ".mysqli_connect_error();
  }
  
  
  
  
  $sql="SELECT * FROM product,trader WHERE product.T_email = trader.Email  and product.cat_number='$interrest_a'or product.cat_number='$interrest_b'or product.cat_number='$interrest_c'or product.cat_number='$interrest_d'or product.cat_number='$interrest_e'";
  
  
  
  
  $result=mysqli_query($con,$sql);
  
  
  if($result)
  {
      while($row=mysqli_fetch_array($result))
      {
          $data[]=$row;
      }
  
  
  
  
      print(json_encode($data)); }
  }
  
  
  
  
  
  mysqli_close($con);
  
  
  ?&gt;
  </code></pre>