You will need the semicolons. Did the mysql node generate an error that would help track down the issue? Can you post the generated sql (after this function) for us to look at?
I don’t understand what you are saying here. Name of the zone on each column is not what I am saying. This is what I am saying:
insert into Zone (Zone, Temp, CO2, RH) values (1, 72, 500, 55);
One table for all the zones. When your customer adds zone 324 and you need the data:
select * form Zone where Zone=324;
No additional table needed. If the customer insists on a “zone table” then create a view:
create view Zone1 as
select * form Zone where Zone=1; --List the columns out, don't use the * when creating a view though.
What you have now is a bad design that will cause more trouble down the road. Imagine what you would have to do if your customer requested a report of all the zone temperatures from yesterday. You will need to write a separate query for each zone. If you do it the right way, then this is simple:
select Zone, Temp from Zone where EntryDate = '2/14/2018'; --If you have a EntryDate column