Sir ,I want to copy 2 msg.id in my sql DB

Sir I want payload and payload 1 (which are 04222436 and 2814 respectively.)
check screenshots
t s r
But i am getting output something like this

check DB


please help

Sir i want 04222436 and 2814 in one line not like this

Do you mean you want the two values to be written into the same row in the database?

If so, you'll need to share how you are currently writing them. As they two events arrive as separate messages, I assume you'll need to do an SQL INSERT for the first one, and then an SQL UPDATE for the second one, to update the row added by the first event.

yes sir.

ok i am attaching query for sql functions which i have written


let newMsg1 = {};
newMsg1.topic = `INSERT INTO  NCS_DATABASE3 (Date_and_Time_India,Date_and_Time_UK ,Event_Type ,Event_Description ,Person_ID,Person_Name_Description ,Fob_Tag_ID ,Trade_ID,Door_ID ,Door_Description ,Status)
VALUES ((strftime('%Y-%m-%d %H:%M:%S','now','localtime')),(strftime('%Y-%m-%d %H:%M:%S','now','localtime','-4 hour','-30 minutes')),'FOB & TAG','DR OPEN BY FOB & TAG',' ','Shipra Nigam','${msg.payload2}','${msg.payload1}',' ',' ','High Risk DR ON')`;
return newMsg1;



Have you worked right through, and understood, an sqlite tutorial as has been suggested previously.

Not related to this question but I cannot believe you are still writing timestamps as strings in various timezones, even though it has been pointed out on multiple occasions that this is a bad idea.

ohk Sir i will update that thing,
for this query can you suggest something it would be great

@knolleary has already suggested what to do.

after inserting update command is showing blank ?

I don't know what you'd like me to respond with @shipra. You haven't provided any information about what you have done. Where did you "insert the update command", what is showing blank?

Pardon sir,
j

From your screenshot I see two function nodes, an SQLite node and a debug node. But I have no idea how they relate to the logic you are trying to create.

I can see some of queries you have written, but I know nothing about the messages you have and how they are arriving. I don't know what properties are set on the messages - you appear to be using msg.payload1 and msg.payload2, which are not standard properties and I have no idea how you are setting them.

The bottom screenshot shows just a part of the query.... how can we say if its right or not if you don't show us the whole thing?

@shipra please pause for a moment and think about what problem you are trying to solve. Then remember that no-one on this forum can see your screen, or automatically knows what you are doing. You need to provide enough information so we can help you.

ok Sure Sir,
i am attaching my whole flow first

[{"id":"f9a462b5.c005b","type":"tab","label":"Flow 3","disabled":false,"info":""},{"id":"745f3dc0.62f50c","type":"sqlite","z":"f9a462b5.c005b","mydb":"1a9ea8ca.835eef","sqlquery":"msg.topic","sql":"SELECT * FROM NCS WHERE Person_ID='{{payload}}';","name":"SQLITE3","x":720,"y":420,"wires":[["15082637.f17282","33ded2fa.bb1a26"]]},{"id":"15082637.f17282","type":"switch","z":"f9a462b5.c005b","name":"","property":"payload","propertyType":"msg","rules":[{"t":"empty"},{"t":"nempty"}],"checkall":"true","repair":false,"outputs":2,"x":810,"y":500,"wires":[["7dda7b2c.a92e5c"],["50967bd4.cf3c24"]]},{"id":"7dda7b2c.a92e5c","type":"change","z":"f9a462b5.c005b","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"CR_FAIL","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":420,"wires":[["601cc32f.f3c8fc","14910207.c303e6","299623f9.9e1adc"]]},{"id":"50967bd4.cf3c24","type":"change","z":"f9a462b5.c005b","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"CR_SUCCESS","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1000,"y":560,"wires":[["d1fe3eb6.fef328","3e7b0cef.92c90c","14910207.c303e6","3493a35f.17437c"]]},{"id":"60631b91.6502ac","type":"function","z":"f9a462b5.c005b","name":"","func":"let newMsg = {};\nnewMsg.topic = `SELECT Fob_Tag_ID FROM NCS_DATABASE3 WHERE Fob_Tag_ID='${msg.payload}'`;\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":480,"y":420,"wires":[["745f3dc0.62f50c"]]},{"id":"e8af5769.005968","type":"function","z":"f9a462b5.c005b","name":"id no space ","func":"msg.payload = msg.payload.replace(/\\s/g, '')\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":250,"y":420,"wires":[["f538c6aa.4fbdc"]]},{"id":"b101ba47.a14638","type":"function","z":"f9a462b5.c005b","name":"function2","func":"\nlet newMsg1 = {};\nnewMsg1.topic = `SELECT Trade_ID FROM NCS_DATABASE3 WHERE Trade_ID ='${msg.payload}'`;\nreturn newMsg1;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":480,"y":480,"wires":[["745f3dc0.62f50c"]]},{"id":"35c0d47e.0acfa4","type":"function","z":"f9a462b5.c005b","name":"tagid no space ","func":"msg.payload = msg.payload.replace(/\\s/g, '')\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":260,"y":480,"wires":[["115451dd.6f8636"]]},{"id":"6a667929.43126","type":"change","z":"f9a462b5.c005b","name":"","rules":[{"t":"set","p":"id","pt":"msg","to":"id","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1290,"y":560,"wires":[["8b5a8b2b.d89828","a4cb6fc0.fed9"]]},{"id":"f538c6aa.4fbdc","type":"change","z":"f9a462b5.c005b","name":"","rules":[{"t":"set","p":"id","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":380,"y":360,"wires":[["60631b91.6502ac"]]},{"id":"115451dd.6f8636","type":"change","z":"f9a462b5.c005b","name":"","rules":[{"t":"set","p":"id","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":340,"y":560,"wires":[["b101ba47.a14638"]]},{"id":"e71276f6.e87e8","type":"debug","z":"f9a462b5.c005b","name":"NCS_debug1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1740,"y":480,"wires":[]},{"id":"cae2a37a.4800e","type":"debug","z":"f9a462b5.c005b","name":"DR1OFF debugggg","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1930,"y":620,"wires":[]},{"id":"601cc32f.f3c8fc","type":"debug","z":"f9a462b5.c005b","name":" debug","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1430,"y":420,"wires":[]},{"id":"d1fe3eb6.fef328","type":"debug","z":"f9a462b5.c005b","name":" debug2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1380,"y":500,"wires":[]},{"id":"8b5a8b2b.d89828","type":"function","z":"f9a462b5.c005b","name":"","func":"\nlet newMsg1 = {};\nnewMsg1.topic = `UPDATE NCS_DATABASE3 SET Status='DR1 ON' WHERE Fob_Tag_ID='${msg.id}'`;\n\nreturn newMsg1;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1540,"y":540,"wires":[["67fb9f4b.0101e8","e71276f6.e87e8"]]},{"id":"14910207.c303e6","type":"mqtt out","z":"f9a462b5.c005b","name":"","topic":"MATCH","qos":"1","retain":"true","broker":"2b0fd3c9.2369b4","x":1220,"y":480,"wires":[]},{"id":"fe81b0fe.8d4718","type":"mqtt in","z":"f9a462b5.c005b","name":"","topic":"FOB","qos":"1","datatype":"auto","broker":"2b0fd3c9.2369b4","x":50,"y":420,"wires":[["e8af5769.005968"]]},{"id":"67fb9f4b.0101e8","type":"sqlite","z":"f9a462b5.c005b","mydb":"1a9ea8ca.835eef","sqlquery":"msg.topic","sql":"","name":"SQLITE3","x":1900,"y":560,"wires":[["e6e5bf32.8e9b48"]]},{"id":"ace67310.165ba","type":"mqtt in","z":"f9a462b5.c005b","name":"","topic":"TRADE","qos":"1","datatype":"auto","broker":"2b0fd3c9.2369b4","x":50,"y":480,"wires":[["cfca5f9.c8792a","35c0d47e.0acfa4"]]},{"id":"e6e5bf32.8e9b48","type":"debug","z":"f9a462b5.c005b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":2200,"y":440,"wires":[]},{"id":"a4cb6fc0.fed9","type":"function","z":"f9a462b5.c005b","name":"","func":"\nvar words=msg.id;\nvar i= words.length;\nif(i==4)\n{\nlet newMsg1 = {};\n\nnewMsg1.topic = `INSERT INTO  NCS_DATABASE3 (Date_and_Time_India,Date_and_Time_UK ,Event_Type ,Event_Description ,Person_ID,Person_Name_Description ,Fob_Tag_ID ,Trade_ID,Door_ID ,Door_Description ,Status)\nVALUES ((strftime('%Y-%m-%d %H:%M:%S','now','localtime')),(strftime('%Y-%m-%d %H:%M:%S','now','localtime','-4 hour','-30 minutes')),'TAG','DR OPEN BY TAG',' ','Shipra Nigam',' ','${msg.id}',' ',' ','DR1 ON')`;\nreturn newMsg1;\n\n}\nif(i==8)\n{\n    let newMsg2 = {};\n\nnewMsg2.topic = `INSERT INTO  NCS_DATABASE3 (Date_and_Time_India,Date_and_Time_UK ,Event_Type ,Event_Description ,Person_ID,Person_Name_Description ,Fob_Tag_ID ,Trade_ID,Door_ID ,Door_Description ,Status)\nVALUES ((strftime('%Y-%m-%d %H:%M:%S','now','localtime')),(strftime('%Y-%m-%d %H:%M:%S','now','localtime','-4 hour','-30 minutes')),'FOB','DR OPEN BY FOB ',' ','Shipra Nigam','${msg.id}',' ',' ',' ','DR1 ON')`;\nreturn newMsg2;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1540,"y":680,"wires":[["67fb9f4b.0101e8"]]},{"id":"d1e58056.388d5","type":"debug","z":"f9a462b5.c005b","name":"2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1830,"y":940,"wires":[]},{"id":"59fec1b5.e9909","type":"debug","z":"f9a462b5.c005b","name":"44","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":750,"y":620,"wires":[]},{"id":"a47b126e.5647d","type":"mqtt out","z":"f9a462b5.c005b","name":"","topic":"MATCH1","qos":"1","retain":"true","broker":"2b0fd3c9.2369b4","x":1180,"y":760,"wires":[]},{"id":"33ded2fa.bb1a26","type":"debug","z":"f9a462b5.c005b","name":"45","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":850,"y":360,"wires":[]},{"id":"b7254879.37a048","type":"function","z":"f9a462b5.c005b","name":"","func":"var w2=w1=msg.payload\nif(w1.length==8)\n{\n    var payload1=w1;\n}\nif(w2.length==4)\n{\n  var payload2=w2;\n}\n\nlet newMsg1 = {};\nnewMsg1.topic =`SELECT * FROM NCS_DATABASE3 WHERE FOB_TAG_ID ='${payload1}' AND TRADE_ID='${payload2}'`;\nreturn newMsg1;\n\n\n\n ","outputs":1,"noerr":0,"initialize":"","finalize":"","x":640,"y":100,"wires":[[]]},{"id":"b60381fa.5e23a","type":"sqlite","z":"f9a462b5.c005b","mydb":"1a9ea8ca.835eef","sqlquery":"msg.topic","sql":"SELECT * FROM NCS WHERE Person_ID='{{payload}}';","name":"SQLITE3","x":680,"y":740,"wires":[["52046306.85bdd4","59fec1b5.e9909"]]},{"id":"52046306.85bdd4","type":"switch","z":"f9a462b5.c005b","name":"","property":"payload","propertyType":"msg","rules":[{"t":"empty"},{"t":"nempty"}],"checkall":"true","repair":false,"outputs":2,"x":850,"y":740,"wires":[["9c6edd56.22dfa"],["d1460df6.b40a38"]]},{"id":"9c6edd56.22dfa","type":"change","z":"f9a462b5.c005b","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"CR_FAIL","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":700,"wires":[["b9124e92.0efa","a47b126e.5647d"]]},{"id":"d1460df6.b40a38","type":"change","z":"f9a462b5.c005b","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"CR_SUCCESS","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":1020,"y":840,"wires":[["a47b126e.5647d","ff563b54.14b"]]},{"id":"b9124e92.0efa","type":"debug","z":"f9a462b5.c005b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1290,"y":680,"wires":[]},{"id":"cfca5f9.c8792a","type":"debug","z":"f9a462b5.c005b","name":"25","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":90,"y":600,"wires":[]},{"id":"299623f9.9e1adc","type":"debug","z":"f9a462b5.c005b","name":"12","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1240,"y":340,"wires":[]},{"id":"3e7b0cef.92c90c","type":"debug","z":"f9a462b5.c005b","name":"122","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":1150,"y":605,"wires":[]},{"id":"464910ad.ac7d58","type":"mqtt in","z":"f9a462b5.c005b","name":"","topic":"TRADE1","qos":"1","datatype":"auto","broker":"2b0fd3c9.2369b4","x":74.99999237060547,"y":835,"wires":[["adf4af98.a343a"]]},{"id":"d55fcd52.ec7308","type":"debug","z":"f9a462b5.c005b","name":"90","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":530,"y":880,"wires":[]},{"id":"adf4af98.a343a","type":"function","z":"f9a462b5.c005b","name":"tagid no space ","func":"msg.payload = msg.payload.replace(/\\s/g, '')\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":290,"y":741.6666259765625,"wires":[["622f5991.8274d"]]},{"id":"622f5991.8274d","type":"change","z":"f9a462b5.c005b","name":"","rules":[{"t":"set","p":"id","pt":"flow","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":440,"y":800,"wires":[["5d69680e.c8ef78"]]},{"id":"5d69680e.c8ef78","type":"function","z":"f9a462b5.c005b","name":"function2","func":"\nlet newMsg1 = {};\nnewMsg1.topic = `SELECT Trade_ID FROM NCS_DATABASE3 WHERE Trade_ID ='${msg.payload}'`;\nreturn newMsg1;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":520,"y":740,"wires":[["b60381fa.5e23a"]]},{"id":"ff563b54.14b","type":"change","z":"f9a462b5.c005b","name":"","rules":[{"t":"set","p":"id","pt":"msg","to":"id","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1430,"y":860,"wires":[["5eb7d2aa.b00234"]]},{"id":"37d4a456.ccf07c","type":"function","z":"f9a462b5.c005b","name":"","func":"\nvar words=msg.id;\nvar i= words.length;\n//msg.id obj=new msg.id();\nif(i==4)\n{\n   var words=msg.id; \n let newMsg1 = {};\n\nnewMsg1.topic = `INSERT INTO  NCS_DATABASE3 (Date_and_Time_India,Date_and_Time_UK ,Event_Type ,Event_Description ,Person_ID,Person_Name_Description ,Fob_Tag_ID ,Trade_ID,Door_ID ,Door_Description ,Status)\nVALUES ((strftime('%Y-%m-%d %H:%M:%S','now','localtime')),(strftime('%Y-%m-%d %H:%M:%S','now','localtime','-4 hour','-30 minutes')),'TAG','DR OPEN BY TAG',' ','Shipra Nigam',' ','${words}',' ',' ','DR1 ON')`;\nreturn newMsg1;\n\n}\nif(i==8)\n{\n    var words=msg.id;\n    let newMsg2 = {};\n\nnewMsg2.topic = `INSERT INTO  NCS_DATABASE3 (Date_and_Time_India,Date_and_Time_UK ,Event_Type ,Event_Description ,Person_ID,Person_Name_Description ,Fob_Tag_ID ,Trade_ID,Door_ID ,Door_Description ,Status)\nVALUES ((strftime('%Y-%m-%d %H:%M:%S','now','localtime')),(strftime('%Y-%m-%d %H:%M:%S','now','localtime','-4 hour','-30 minutes')),'FOB','DR OPEN BY FOB ',' ','Shipra Nigam','${msg.id}',' ',' ',' ','DR1 ON')`;\nreturn newMsg2;\n}","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1740,"y":980,"wires":[[]]},{"id":"9244d030.a67258","type":"sqlite","z":"f9a462b5.c005b","mydb":"1a9ea8ca.835eef","sqlquery":"msg.topic","sql":"","name":"SQLITE3","x":1980,"y":820,"wires":[["e5690e50.38"]]},{"id":"466c3838.ad3ac8","type":"function","z":"f9a462b5.c005b","name":"","func":"\nlet newMsg1 = {};\nnewMsg1.topic = `INSERT INTO  NCS_DATABASE3 (Date_and_Time_India,Date_and_Time_UK ,Event_Type ,Event_Description ,Person_ID,Person_Name_Description ,Fob_Tag_ID ,Trade_ID,Door_ID ,Door_Description ,Status)\nVALUES ((strftime('%Y-%m-%d %H:%M:%S','now','localtime')),(strftime('%Y-%m-%d %H:%M:%S','now','localtime','-4 hour','-30 minutes')),'FOB & TAG','DR OPEN BY FOB & TAG',' ','Shipra Nigam','${msg.payload1}',' ',' ',' ','High Risk DR ON')`;\nreturn newMsg1;\n\n\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1820,"y":820,"wires":[["9244d030.a67258"]]},{"id":"3493a35f.17437c","type":"change","z":"f9a462b5.c005b","name":"","rules":[{"t":"set","p":"id","pt":"msg","to":"id","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":1430,"y":760,"wires":[["cd1d4512.4f5738"]]},{"id":"cd1d4512.4f5738","type":"change","z":"f9a462b5.c005b","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"id","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1600,"y":720,"wires":[["e531bf44.9cb468"]]},{"id":"e02bbeaa.c76358","type":"debug","z":"f9a462b5.c005b","name":"3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1850,"y":700,"wires":[]},{"id":"5eb7d2aa.b00234","type":"change","z":"f9a462b5.c005b","name":"","rules":[{"t":"set","p":"payload1","pt":"msg","to":"id","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":1570,"y":940,"wires":[["78f59b6c.c52f6c"]]},{"id":"e531bf44.9cb468","type":"function","z":"f9a462b5.c005b","name":"","func":"msg.payload1=msg.payload;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1609,"y":798,"wires":[["e02bbeaa.c76358","466c3838.ad3ac8"]]},{"id":"78f59b6c.c52f6c","type":"function","z":"f9a462b5.c005b","name":"","func":"msg.payload2=msg.payload1;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":1640,"y":860,"wires":[["d1e58056.388d5","e5690e50.38"]]},{"id":"e5690e50.38","type":"function","z":"f9a462b5.c005b","name":"fun 2","func":"\nlet newMsg1 = {};\nnewMsg1.topic = `UPDATE NCS_DATABASE3 SET Trade_ID='${msg.payload2}' WHERE Fob_Tag_ID='${msg.payload1}'`;\n//newMsg1.topic = `UPDATE NCS_DATABASE3 SET Trade_ID='${msg.payload2}'`;\nreturn newMsg1;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":2010,"y":900,"wires":[["9244d030.a67258"]]},{"id":"e76cebe4.97ed08","type":"sqlite","z":"f9a462b5.c005b","mydb":"1a9ea8ca.835eef","sqlquery":"msg.topic","sql":"","name":"SQLITE3","x":2120,"y":760,"wires":[[]]},{"id":"1a9ea8ca.835eef","type":"sqlitedb","z":"","db":"/home/shipra/Documents/NCS_Projects/IOT/NCS_API/New DB Testing/NCS_new.db","mode":"RWC"},{"id":"2b0fd3c9.2369b4","type":"mqtt-broker","z":"","name":"","broker":"tcp://mqtt.eclipse.org","port":"1883","clientid":"NCS_Client_033","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]

Sir i am taking user input as FOB ID and TAG ID together from terminal .AND if person is in DB it should store that ID in my DB with time and date and other functionalities.

now i want that whenever user tries to enter by entering both inputs together from terminal it should alos check in DB(which is successfully done)
now after that it should store "DR ON by BOTH FOB AND TAG" and "" and <"Tagid">
in their particular column in my db

And please describe the logic you have in the flow, node by node, to explain what it is doing - or what you would like it todo.

FOB TRADE and TRADE 1 my mqtt nodes where they are pub the ID's with my DB
after checking match and match are my sub where i am getting mesg CR_SUCCESS
after that i am simply updating my columns in my db according to my req

Sir ,How can I upload together from FOB and TRADE 1 MQTT nodes in my DB please help

Sir I am little bit in trouble please sugges t how can i do this .
I am taking 3 nodes (FOB,TRADE,TRADE1) from my gateway code I am taking 3 user case inputs1)done(only fob taking) 2)done(only tag taking) 3 )(not done)input taking from fob and tag together .
what happening in the flow steps are below:
1)when user press1 fob pub goes in node red check the id in my DB ,if successs then update that in my DB.
2)same as 1 but with tag this time
3)here is the issue is comimg. Whenever i am publishing with FOB and TAG mqtt nodes I want both column of mysql i.e FOB id andTAG id(my sql column name where i am updation the entered successfull id) should get filled together ,but issue is coming as FOB has the same flow and i have attached that with my previous sql query in case 1 it is only updating my FOB column ,but i want to update both FOB and TAG together( only for case 3) and also update my DOOR status with some different string not same as in case 1 and 2

What i need is when user press case 3) FOB MQTT node check in DB and TRADE 1 also checks in DB (which is done),but if both are in my DB it together updates both id in their respective column of my db.
So whenever the id is coming from FOB and TRADE1 then and then only it should update in my DB with both id in their respective columns (what is happening is as soon as it gets FOB successful id it is only upating my FOB column which is not i want in this case).
So kindly suggest something ,thanks in advance.

Do you know exactly what queries you want to pass the database to achieve what you want?

yes that query i had solved just now ,by using join node both id is coming and successfully updated in my DB as you can see

Excellent, well done.

Thank you sir ,thank you to Node red team all are very helpful.

Sir one bug is coming can you help sir