I have the following set returned from a database:
[PRE]
ORDER_ID NUM_ORDERS SUB_ORDERID ITEM QUANTITY
2728704 2 10943578 MONITOR 5000
2728704 2 10943578 CD 1500
2728704 2 10943578 USB DRIVE 120
2728704 2 10943577 MONITOR 5000
2728704 2 10943577 HARD DISK 100
2728704 2 10943577 CABLES 120
[/PRE]
What I need is to split a report on sub-orders.
[PRE]
ORDER_ID NUM_ORDERS SUB_ORDERID ITEM QUANTITY
First Page
2728704 2 10943578 MONITOR 5000
CD 1500
USB DRIVE 120
Second Page
2728704 2 10943577 MONITOR 5000
HARD DISK 100
CABLES 120
[/PRE]
I have been trying to get the data into a multidimensional array with the following:
while ($row = oci_fetch_array($stid, OCI_RETURN_NULLS)) {
$myData[]=$row;
}
But for some reason, the iterating through the array is not working out as planned. Basically, I do now know how may suborders an order will have, therefore I do not know how many separate reports there will be.
I think that I am not properly constructing the multi-dimensional array and perhaps may not need it at all.
Thoughts?