title: Fetch two tables combined (not showing wanted result)
body: <p>I have two tables </p>
  
  <pre><code>$table1 = ("10", "20", "30", "40");
  $table2 = ("a", "b", "c", "d");
  </code></pre>
  
  <p>Now i want to fetch these two tables combined. here is my SQL CODE</p>
  
  <pre><code>$StatementOne = $_POST['catogry']."edb";
  $StatementTwo = "SELECT* FROM ".$_POST['catogry']."ior";
  
   $sql=mysqli_query($con," ".$StatementTwo." INNER JOIN ".$StatementOne."
  ON (".$_POST['catogry']."edb.ImportedItemDescriptionPartName = ".$_POST['catogry']."ior.Make  
  AND ".$_POST['catogry']."ior.Vehicle = ".$_POST['catogry']."edb.VehicleModel) 
  WHERE Vehicle='".$_POST['vehicle']."' AND Make='".$_POST['meterial']."'
  " )or die ('Invalid Query:'. mysqli_error($con));
  </code></pre>
  
  <p>HERE IS MY PHP CODE</p>
  
  <pre><code>while ($row =mysqli_fetch_array($sql))
  
  {echo "&lt;form action='edit-entriy.php?id=" . $row['EDBQuotaID'] . "' method='post'     enctype='multipart/form-data' name='myForm'&gt;&lt;tr&gt;";echo "&lt;div style=' clear:both;'&gt;&lt;div class='programing-page-width'&gt;&lt;div class='mysqldata_fetch'&gt;&lt;input type='submit' name='EDIT' value='Edit'&gt;&lt;/div&gt;";
  $post="list";
  $checkboxes = (isset($_POST[$post]) ? $_POST[$post] : array());
  foreach($checkboxes as $value)
  {
  if ($value == 1)
  {echo"&lt;div class='mysqldata_fetch'&gt;". $row['PralSerial'] ."&lt;/div&gt;";}
  
  if ($value == 2)
  {echo"&lt;div class='mysqldata_fetch'&gt;". $row['EDBQuotaID'] ."&lt;/div&gt;";}
  
  if ($value == 3)
  {echo"&lt;div class='mysqldata_fetch'&gt;". $row['Grade'] ."&lt;/div&gt;";}
  
  if ($value == 4) 
  {echo"&lt;div class='mysqldata_fetch'&gt;". $row['ImportedItemDescriptionPartName'] ."  &lt;/div&gt;";}
  
  if ($value == 5)
  {echo"&lt;div class='mysqldata_fetch'&gt;". $row['ManufacturedPartName'] ."&lt;/div&gt;";}
  
  if ($value == 6)
  {echo"&lt;div class='mysqldata_fetch'&gt;". $row['Vehicle'] ."&lt;/div&gt;";}
  
  if ($value == 7)
  {echo"&lt;div class='mysqldata_fetch'&gt;". $row['HSCode'] ."&lt;/div&gt;";}
  
  if ($value == 8)
  {echo"&lt;div class='mysqldata_fetch'&gt;". $row['NoofUnitsAnnum'] ."&lt;/div&gt;";}
  
  if ($value == 9)
  {echo"&lt;div class='mysqldata_fetch'&gt;". $row['TotalApprovedQuantity'] ."&lt;/div&gt;";}
  
  if ($value == 10)
  {echo"&lt;div class='mysqldata_fetch'&gt;". $row['UnitsAnnum'] ."&lt;/div&gt;";}
  
  if ($value == 11)
  {echo"&lt;div class='mysqldata_fetch'&gt;". $row['AsCalculation'] ."&lt;/div&gt;";}
  
  if ($value == 12)
  {echo"&lt;div class='mysqldata_fetch'&gt;". $row['SNo'] ."&lt;/div&gt;";}
  
  if ($value == 13)
  {echo"&lt;div class='mysqldata_fetch'&gt;". $row['Make'] ."&lt;/div&gt;";}
  
  }
  </code></pre>
  
  <p>Now I have got result something like this</p>
  
  <pre><code>a - 10,
  b - 10, 
  c - 10, 
  d - 10, 
  a - 20, 
  b - 20, 
  c - 20, 
  d - 20, 
  a - 30, 
  b - 30, 
  c - 30, 
  d - 30, 
  a - 40, 
  b - 40, 
  c - 40, 
  d - 40,
  </code></pre>
  
  <p>this is not that result which i wanted. It should be like this.</p>
  
  <pre><code>a - 10,
  b - 20, 
  c - 30, 
  d - 40, 
  </code></pre>
  
  <p>It is relay hard for me to make you understand my issue hope you can understand and answered my question.</p>
  
  <p>Sorry i am not well in english. I appologise for any mistake.</p>