Where do you get the data from?
Nov 25, 2022
6
Level 1
Level 73
Level 1
@Tray2 That's data after group by from columns (ref_venue_id, order_date, label, class) Here's the real data before groupped.
Here's the data i need to filled on the excel file

If you have an idea. Please help me. Thanks so much!
Level 73
@Saturnlai I asked where does it come from,.
- Does it come from the database?
- What does the data look like in the source?
- What is the desired result?
Level 1
-
Yes, it's come from the database.
-
The data after a query is an array.
Input
[
1 => array:14 [
"order_id" => 2524
"uuid" => "PO-20220807-000014-001"
"unit_price_without_vat" => 179000.0
"total_without_vat" => 179000.0
"units_total" => 1
"venue_id" => 15
"event_category" => "virtual_catalog"
"ref_venue_id" => "58814"
"event_name" => "Kansai"
"label_division" => array:2 [ …2]
"class" => "Apparel"
"label" => "Collection"
"source" => "online"
"order_date" => "2022-08-07"
]
2 => array:14 [
"order_id" => 2524
"uuid" => "PO-20220807-000014-002"
"unit_price_without_vat" => 179000.0
"total_without_vat" => 179000.0
"units_total" => 1
"venue_id" => 15
"event_category" => "virtual_catalog"
"ref_venue_id" => "58814"
"event_name" => "Kansai"
"label_division" => array:2 [ …2]
"class" => "Apparel"
"label" => "Collection"
"source" => "online"
"order_date" => "2022-08-07"
]
3 => array:14 [
"order_id" => 2524
"uuid" => "PO-20220807-000014-003"
"unit_price_without_vat" => 51000.0
"total_without_vat" => 51000.0
"units_total" => 1
"venue_id" => 15
"event_category" => "virtual_catalog"
"ref_venue_id" => "58814"
"event_name" => "Kansai"
"label_division" => array:2 [ …2]
"class" => "Apparel"
"label" => "Collection"
"source" => "online"
"order_date" => "2022-08-07"
]
4 => array:14 [
"order_id" => 2528
"uuid" => "PO-20220807-000018-001"
"unit_price_without_vat" => 291000.0
"total_without_vat" => 291000.0
"units_total" => 1
"venue_id" => 15
"event_category" => "virtual_catalog"
"ref_venue_id" => "58814"
"event_name" => "Kansai"
"label_division" => array:2 [ …2]
"class" => "Accessory"
"label" => "Collection"
"source" => "offline"
"order_date" => "2022-08-07"
]
6 => array:14 [
"order_id" => 2531
"uuid" => "PO-20220807-000021-001"
"unit_price_without_vat" => 145000.0
"total_without_vat" => 145000.0
"units_total" => 1
"venue_id" => 15
"event_category" => "virtual_catalog"
"ref_venue_id" => "58814"
"event_name" => "Kansai"
"label_division" => array:2 [ …2]
"class" => "Apparel"
"label" => "Collection"
"source" => "offline"
"order_date" => "2022-08-07"
]
]
- The results I just want Output
[
"58814"=>[
"2022-09-16"=>[
"Collection"=>[
"Apparel"=>[
"total_without_vat": 145000
],
"Accessory"=>[
"total_without_vat": 245000
]
],
"RRL"=>[
"Apparel"=>[
"total_without_vat": 5000
],
"Accessory"=>[
"total_without_vat": 15000
]
]
],
"2022-09-17"=>[
"Collection"=>[
"Apparel"=>[
"total_without_vat": 125000
],
"Accessory"=>[
"total_without_vat": 3335000
]
],
"RRL"=>[
"Apparel"=>[
"total_without_vat": 34000
],
"Accessory"=>[
"total_without_vat": 4000
]
]
]
]
]
Level 73
@Saturnlai You need to show the table structure, and examples of the data in those tables.
The array doesn't tell me anything, since you need a query that does that for you, and not process the data once again in php after you fetched it from the database.
Level 1
@tray2 In such a case I just have only an array with the data shared. Is that the process?
Please or to participate in this conversation.


