Hi all,
On a Raspberry Pi I am attempting to use a FUNCTION NODE to pass a msg.topic containing an SQlite SELECT query.
msg.topic = 'SELECT * FROM dhtreadings WHERE TankID = "BlackLaundry" AND TankTime > ${BlackLaundryLevel}';
I receive the error message
Error: SQLITE_ERROR: unrecognized token: "$"
With no formatting on the variable BlackLaundryLevel
msg.topic = 'SELECT * FROM dhtreadings WHERE TankID = "BlackLaundry" AND TankTime > BlackLaundryLevel';
I get the error:
Error: SQLITE_ERROR: no such column: BlackLaundryLevel
Can anyone please inform me of the correct syntax to pass a variable to a SELECT statement in a message topic?