title: PHP Mysqli selecting wrong column
body: <p>I have a SQL query as below. When i run this in MYSQL workbench it is selecting the correct ID from consignment table but when i see the result in PHP it is selecting the ID from parcel table.</p>
  
  <p>Any reason why it is doing so?</p>
  
  <p>The valArray  variable has the ID from parcel table instead of consignment table.</p>
  
  <p>Thanks</p>
  
  <pre><code>        SELECT *
          FROM consignment c
          inner join parcel p on c.id = p.consignment_id
          WHERE  c.date_booked &gt;='2020-06-04' AND c.date_booked &lt;='2020-06-04' AND p.hold='1'
  
  
          $rs = mysqli_query(self::$connection, $sql);
          $objectArray = array();
          while ($valArray = mysqli_fetch_assoc($rs))
          {
              $objectArray[] = new $className($valArray);
          }
  </code></pre>