Thank you very much for your consideration.
I think I lost one of your previous message about my query problem.
Anyway, would you please read again the 7th reply by me. (explanation about the whole story of my goal).
To be honest the first query is not important for me.Even it is better not to show for clients. But, I do not know how to get ($net).
My issue is this. " I want to have update inventory($net) in order to compare it with its consumption formulation ".
The second query returns materials consumption formulations.but, it can not return the update inventory($net). So, I think I can get that by the first query.
The problem is that, I donβt know how to populate $net objects so that its objects find corresponding materials. For example, the value for milk should be put in front of milk. the salt should be put in front of salt.
As I said, I prefer not to use join Technic. because, maybe I will get the $net via rest API.
And, my data is fake and they are just for testing.
Here is the code:
REATE TABLE production_plan
(
id
int(11) NOT NULL,
product_code
text NOT NULL,
product_name
text NOT NULL,
product_entrance
text NOT NULL,
unit_entrance
text NOT NULL,
product_quantity
text NOT NULL,
unit
text NOT NULL,
others
text NOT NULL,
product_line
text NOT NULL,
week_day
text NOT NULL,
pdate
text NOT NULL,
shift
text NOT NULL,
start_time
text NOT NULL,
finish_time
text NOT NULL,
duration
text NOT NULL,
description
text NOT NULL,
username
text NOT NULL,
first_date
text NOT NULL,
editor
text NOT NULL,
edit_date
text NOT NULL,
bom_name
text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
β
β Dumping data for table production_plan
INSERT INTO production_plan
(id
, product_code
, product_name
, product_entrance
, unit_entrance
, product_quantity
, unit
, others
, product_line
, week_day
, pdate
, shift
, start_time
, finish_time
, duration
, description
, username
, first_date
, editor
, edit_date
, bom_name
) VALUES
(1, β533β, βmilkβ, β150β, βtonβ, β150000β, βbottleβ, β-β, βsidelβ, ββ, β2020/3/21β, β2β, β16:30β, β22:30β, β06:00:00β, ββ, ββ, ββ, ββ, β2020/07/03β, β1β),
(2, β251β, βdooghβ, β150β, βtonβ, β85000β, βbottleβ, β-β, βserakβ, ββ, β2020/3/21β, β2β, β17:30β, β22:30β, β05:00:00β, ββ, ββ, ββ, ββ, β2020/07/05β, βdefaultβ),
(3, β251β, βdooghβ, ββ, ββ, β136000β, βbottleβ, β-β, βserakβ, ββ, β2020/3/21β, β3β, β22:30β, β06:30β, β08:00:00β, ββ, ββ, ββ, ββ, β2020/07/05β, βdefaultβ),
(4, β582β, βmilkβ, ββ, ββ, β144000β, βbottleβ, β-β, βsidelβ, ββ, β2020/3/22β, β1β, β06:30β, β12:30β, β06:00:00β, ββ, ββ, ββ, ββ, ββ, ββ),
(5, β581β, βmilkβ, ββ, ββ, β144000β, βbottleβ, β-β, βsidelβ, ββ, β2020/3/22β, β2β, β14:30β, β20:30β, β06:00:00β, ββ, ββ, ββ, ββ, ββ, ββ),
(6, β441β, βsoft-drinkβ, ββ, ββ, β88000β, βbottleβ, β-β, βN2β, ββ, β2020/3/22β, β2β, β18:30β, β22:30β, β04:00:00β, ββ, ββ, ββ, ββ, ββ, ββ),
(7, β441β, βsoft-drinkβ, ββ, ββ, β176000β, βbottleβ, β-β, βN2β, ββ, β2020/3/22β, β3β, β22:30β, β06:30β, β08:00:00β, ββ, ββ, ββ, ββ, ββ, ββ),
(8, β254β, βdooghβ, ββ, ββ, β68000β, βbottleβ, β-β, βserakβ, ββ, β2020/3/22β, β3β, β22:30β, β02:30β, β04:00:00β, ββ, ββ, ββ, ββ, ββ, ββ),
(9, β252β, βdooghβ, ββ, ββ, β68000β, βbottleβ, β-β, βserakβ, ββ, β2020/3/22β, β3β, β02:30β, β06:30β, β04:00:00β, ββ, ββ, ββ, ββ, β2020/07/05β, βdefaultβ),
(10, β251β, βdooghβ, ββ, ββ, β136000β, βbottleβ, β-β, βserakβ, ββ, β2020/3/22β, β1β, β06:30β, β14:30β, β08:00:00β, ββ, ββ, ββ, ββ, β2020/07/05β, βdefaultβ),
(11, β251β, βdooghβ, ββ, ββ, β51000β, βbottleβ, β-β, βserakβ, ββ, β2020/3/22β, β2β, β14:03β, β17:30β, β03:27:00β, ββ, ββ, ββ, ββ, ββ, ββ),
(12, β123β, βsoft-drinkβ, ββ, ββ, β60000β, βbottleβ, β-β, βCheshmeβ, ββ, β2020/3/22β, β2β, β16:30β, β22:30β, β06:00:00β, ββ, ββ, ββ, ββ, ββ, ββ),
(13, β123β, βsoft-drinkβ, ββ, ββ, β60000β, βbottleβ, β-β, βCheshmeβ, ββ, β2020/3/22β, β3β, β22:30β, β04:30β, β06:00:00β, ββ, ββ, ββ, ββ, ββ, ββ),
(14, β-β, β-β, ββ, ββ, β-β, β-β, βCIPβ, βsidelβ, ββ, β2020/5/23β, β1β, β14:30β, β18:30β, β04:00:00β, ββ, ββ, β2020/06/17β, ββ, ββ, ββ),
(15, β-β, β-β, ββ, ββ, β-β, β-β, βCIPβ, βsidelβ, ββ, β2020/5/23β, β1β, β14:30β, β18:30β, β04:00:00β, ββ, ββ, β2020/06/17β, ββ, β2020/06/17β, ββ),
(16, β101β, βsoft-drinkβ, ββ, ββ, β31000β, βbottleβ, β-β, βN1β, ββ, β2020/7/4β, β1β, β06:30β, β18:30β, β12:00:00β, ββ, ββ, β2020/07/03β, ββ, ββ, β1β),
(17, β121β, βsoft-drinkβ, ββ, ββ, β200000β, βbottleβ, β-β, βCheshmeβ, ββ, β2020/7/25β, β1β, β07:30β, β14:30β, β07:00:00β, ββ, ββ, β2020/07/25β, ββ, ββ, ββ);
Very best regards.