I want to fetch invoice data from two tables

table a is in single row and table b data should be multiple rows

single data is fetching correctly but facing problem with table 2 multiple data fetch.

php file


$connection= mysqli_connect("localhost","root","","invoice");

  $invID = $_POST['ID'];

     $Invo = "SELECT a.in_no, a.client, a.add, a.Date, a.subTotal a.gTotal,, b.item, b.quantity, b.price from invoice a, invoiceItems b where a.in_no = b.in_id AND  in_no = '$invID' ";

 $runQuery = $connection->query( $Invo);

if($runQuery->num_rows > 0) { 
$result = $runQuery->fetch_array();
} // if num_rows

echo json_encode($result);

js file

function Invoice (ID = null) {

if(ID) {
        url: 'fetch.php',
        type: 'post',
        data: {ID: ID},
        dataType: 'json',
        success:function(response) {

            // invoice id 
            $(".footerClass").append('<input type="hidden" name="invoId" id="iD" value="'+response.in_no+'" />');

            // invoice no
            // Name
            // pat.Address
            // invoice date

        }else {
            alert('error loading data');