Hello. I have 2 tables in my MYSQL database called "Komplektacija" and "pack_to_light"
"komplektacija" table holds the information about Item1, Item2, Item3 ......
"pack_to_light" table holds the information about which Item is assigned to certain devices
What I need to do, is compare both tables and find a device in "pack_to_light" table which has "Item" and "Serial" that matches the "Item" and "Serial" in "komplektacija" table and update Quantity in "pack_to_light" table.
For this particular example. I would need to return:
device 1 | Item1 | 12345 | 1
I do not have much PHP experience but I believe I would need to use UNION operator in PHP to find matching data. I am trying to understand how to find matching data first, then I worry about updating quantity. Would someone be able to give me a hint
"komplektacija" table holds the information about Item1, Item2, Item3 ......
"pack_to_light" table holds the information about which Item is assigned to certain devices
What I need to do, is compare both tables and find a device in "pack_to_light" table which has "Item" and "Serial" that matches the "Item" and "Serial" in "komplektacija" table and update Quantity in "pack_to_light" table.
For this particular example. I would need to return:
device 1 | Item1 | 12345 | 1
I do not have much PHP experience but I believe I would need to use UNION operator in PHP to find matching data. I am trying to understand how to find matching data first, then I worry about updating quantity. Would someone be able to give me a hint
Last edited: