I have two tables:
hardware(ID, DEVICEID, NAME, ...)
and
softwares(ID, HARDWARE_ID, PUBLISHER, NAME, VERSION, ETC ...).
I need to insert into the softwares table, but I do not have HARDWARE_ID
, I only get the hardware name ( hardware.NAME
), this HARDWARE_ID
is what makes the relationship between the tables.
I do not want to give select in hardware where name = $software['server_name']
for each record line, I'm creating an API that will include software arrays sent via JSON.
Can anyone help me?