Hey, again a noob question ^^
i tried 2 put something into my sql DB and it worked
function:
var frisch = msg.count;
query = INSERT INTO Wasser(Stand) VALUES("+frisch+");;
msg.topic = query;
return msg;
but now i want, that he updates "Stand" with every new entry....
var frisch = msg.count;
query = UPDATE Wasser(Stand) VALUES("+frisch+") WHERE 1;;
msg.topic = query;
return msg;
this was my try, but it didnt worked... maybe my DB has the wrong settings or something. Can someone help me and explain the mistake i am doing? thanks!
Your update command isn't quite right but you are close.
Don't forget that if you want to update a record, you have to select the right row with the WHERE part. How you construct the WHERE is dependent on what fields (columns) you have in the db table.
You will probably want a tool that gives you a user interface to your MySQL db.