19.06.2024, 11:00
You are missing a single quote before " .. medida_param
You can use Lua multi-line string syntax to make it code more readable:
Lua strings can be wrapped in single or double quotes. But MySQL expects parameters to be wrapped in single quotes.
You can use Lua multi-line string syntax to make it code more readable:
Code:
query = [[
INSERT INTO test2 (instalacion, medida, usuario, valor)
VALUES (
']] .. instalacion_param .. [[',
']] .. medida_param .. [[',
']] .. usuario_param .. [[',
]] .. valor_param .. [[
)
]]
log(dbcon:execute(query))
Lua strings can be wrapped in single or double quotes. But MySQL expects parameters to be wrapped in single quotes.