title: there are two different tables in database i want to fetch data from them in one single table in a sequence through date or time?
body: <pre><code>if(isset($_GET['buyer_id'])){
      $buyer_id = $_GET['buyer_id'];
      $buyer_query = mysqli_query($conn, "SELECT * FROM new_entry_table where buyer_id = '$buyer_id'");
      if(mysqli_num_rows($buyer_query) &gt; 1){
  
          $i = 1;
  
          while($show = mysqli_fetch_array($buyer_query)){
  
              $v_p_store = $show['per_vihicle_price'];
              $store_sum = $v_p_store + @$store_sum;
  //**************************************
              $vihicle_id = $show['vihicle_id'];
              $select_vihicle = mysqli_query($conn, "SELECT * from vihicles where id = '$vihicle_id'");$store_vihicle = mysqli_fetch_array($select_vihicle);
  
              $mine_id = $show['id'];
              $select_mines = mysqli_query($conn, "SELECT * from mines where mine_id = '$mine_id'");$store_mine = mysqli_fetch_array($select_mines);
              ?&gt;
              &lt;tr&gt;
                  &lt;td&gt;&lt;?php echo $i++; ?&gt;&lt;/td&gt;
  
                  &lt;td&gt;&lt;?php echo $show['date']; ?&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;?php echo $store_vihicle['vihicle_type'] . " " . $store_vihicle['vihicle_no']; ?&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;?php echo $store_mine['mine_name'] . " # " . $store_mine['mine_no']; ?&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;?php echo "KG- " . $show['weight']; ?&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;?php echo "RS- " . $show['price']; ?&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;?php echo "RS- " . $show['per_vihicle_price']; ?&gt;&lt;/td&gt;
                  &lt;td&gt;&lt;?php echo "RS- " . $store_sum; ?&gt;&lt;/td&gt;
                  &lt;td&gt;0&lt;/td&gt;
              &lt;/tr&gt;
          &lt;?php }
      }
  }
  </code></pre>
  
  <p>PHP I wanna fetch data from two table like from <code>buyer_record</code> and from <code>hr_recieve_payment</code>. </p>
  
  <p>There are two different tables in database i want to fetch data from them in one single table in a sequence through date or time?</p>