I have an sql statement that has left join between table orders and order_item
$sql = "SELECT * FROM orders
LEFT JOIN order_item on orders.order_id = order_item.order_id
LEFT JOIN product on order_item.product_id = product.product_id
LEFT JOIN categories on categories.categories_id = product.categories_id
LEFT JOIN brands on brands.brand_id = product.brand_id
WHERE order_date >= '$start_date' AND order_date <= '$end_date' and order_status = 1";
$query = $connect->query($sql);
I echo $row['quantity']
But it's displaying quantity from table orders and not from table order_item.
How can I echo quantity from order_item?