If it helps...
For my lenghly insert-queries I use a UI-template node connected to the mysql node.
Make sure to set the property as... msg.topic
INSERT INTO node_summary (uniqueID, date, time, deviceID, nodeID, location, deviceType, power_source, input_voltage, regulated_voltage, temperature, humidity, pressure, co2, python_script, oled_contents) VALUES (
'{{uniqueID}}',
'{{date}}',
'{{time}}',
'{{deviceID}}',
'{{nodeID}}',
'{{location}}',
'{{deviceType}}',
'{{power_source}}',
'{{input_voltage}}',
'{{regulated_voltage}}',
'{{temperature}}',
'{{humidity}}',
'{{pressure}}',
'{{co2}}',
'{{python_script}}',
'{{oled_contents}}'
)
ON DUPLICATE KEY UPDATE
uniqueID='{{uniqueID}}',
date='{{date}}',
time='{{time}}',
deviceID='{{deviceID}}',
nodeID='{{nodeID}}',
location='{{location}}',
deviceType='{{deviceType}}',
power_source='{{power_source}}',
input_voltage='{{input_voltage}}',
regulated_voltage='{{regulated_voltage}}',
temperature='{{temperature}}',
humidity='{{humidity}}',
pressure='{{pressure}}',
co2='{{co2}}',
python_script='{{python_script}}',
oled_contents='{{oled_contents}}'