title: fetch_array gets only one row
body: <p>Howdee,
  I'm trying to send two MySQL queries, each for a different table, to connect the results afterwards into a single array for further processing.
  Here's my code:</p>
  <pre><code>function list_invoice($invoice_id){
  global $conn;
      $query_getinvoice = &quot;SELECT * FROM invoices WHERE id = &quot;.$invoice_id;
      $query_getlines = &quot;SELECT * FROM invoice_lines WHERE invoice_id = &quot;.$invoice_id;
      $result = $conn-&gt;query($query_getinvoice);
      $result2 = $conn-&gt;query($query_getlines);
  
      $invdata = $result-&gt;fetch_array(MYSQLI_ASSOC);
      $invdata2 = $result2-&gt;fetch_array(MYSQLI_ASSOC);
      
      $the_data = array_merge($invdata,$invdata2);
  }
  </code></pre>
  <p>My problem with the code above is that in <strong>invoice_lines</strong> table there are actually three rows with the same <strong>invoice_id</strong>, but the <strong>print_f($the_data)</strong> or even <strong>print_f($result2)</strong> returns only one row. Why's that?</p>