Query to extract data from MariaDB using SELECT statement to link with the RFID card detected

Thanks @kuema for your detailed explanation. I have tried exactly like you suggested and have shared my below findings of the three debug nodes from the flow that I have.

Please see to it, the data from the database is still not getting extracted. You might get a clear view from the screenshots.

Your function node has two outputs, please use only one directly linked to the database node and try again :wink:

(I mean, you have to actually set the number of outputs to 1 again. Using multiple outputs is not needed here)

1 Like

Thanks a lot, I just did that and now the problem is solved. Grateful to you and everyone who has helped in this matter. :slight_smile:

1 Like

Just one last question : Has it got anything with Primary key in the database to do? Is it necessary that the column name in the query must be a primary key in the database?

No, not for functionality. But for performance reasons I would use proper indexes on columns that are part of conditions in your queries.

In most database systems the primary key is indexed by default, so adding one on uID would be a good idea. (I don't know enough about your table structure for a precise answer)

At least an index on uID would be recommended.

1 Like

I changed the column uID to primary key before trying any further implementations as I thought it could also be the reason.

Thanks for your guidance and sharing knowledge. Have a nice day :slight_smile:

Regards

Just to clear up why this did not replace ${msg.payload} with the value from the payload. It is because, as I said in my last post and as detailed in the link I posted you need to use backticks not double quotes to use this form of string interpollation.

@Colin Thanks again for your reply. I understand exactly now what you mean, I am sorry that I somehow could not try exactly like you suggested as being a beginner I got a bit confused. I am sure it is gonna work too. Thanks for your efforts, means a lot :slight_smile:

how you have connected your database (mssql) with node red please tell

@shipra - this is a thread that is 9 months old and about MariaDB not mssqj. Please stick to your original thread.

I am closing this thread.