title: select multiple tables mysql
body: <p>I am trying to select two tables with where clause, </p>
  
  <p>The problem: I am getting more than 2 result.   something like <code>123451111</code> I only have two ids with the value 1. I think I am doing it wrong. </p>
  
  <p>The tables don't have the same structure and are not related by any means. Any ideas?</p>
  
  <pre><code>&lt;?php include_once("config.php");
     $s = '1';
  $stmt =$mydb-&gt;prepare("select * FROM table1,table2 where table1.id = ? or table2.id = ?");
  stmt-&gt;bind_param('ss', $s, $s);
  echo $mydb-&gt;error;
  $stmt-&gt;execute();
  
  ?&gt;
  &lt;?php
  $results  = $stmt-&gt;get_result();
  while ($row = $results-&gt;fetch_assoc()) {
  echo $row['id']."&lt;br/&gt;";
  }
  ?&gt;
  </code></pre>