Combine a message from mqtt and a select result from db

Hi,
I am receiving a message on mqtt which I get as variable using a function " var status = msg.payload" but I am not able (i don t know how to do) to get in same function a value from an sql select and compare it to my status. I wasn t able to find such an example...if anyone can help me I would be very gratefull

thank you

There is an example in the cookbook that shows how to combine messages from two sources into one message so that you can use them together.
https://cookbook.nodered.org/basic/join-streams

1 Like

Thank you very much, not sure how i was not able to find it but was exactly what i needed
Thanks a lot again