database connection and data update in the given row

hello, I need to write code for 2 buttons, one button named ON sends the value 1 to the database and the OFF button sends the value 0, but I don't know how to make some values ​​sent to the database and I don't even know how to connect to the database, please advise , thank you. So the function will be such that the button always sends the value to the specified database.

Hello :wave:,
Welcome to the community
Use firebase database and firebaseDB component

thank you for the advice, but I don't know how to do it, I need some advice on how to put the data together, I would need some screen code in the app inverter in blocks that connects to the database, and in the given table in the database modifies the value in the row where the ID is 1, for example, to the value 0

1 Like

Set your firebase database url in FirebaseDB component and in blocks section you will got your firebase blocks

Do we know that the OP needs to use Firebase ? They have not indicated that they need an online database, maybe tinyDB or sqlite will be sufficient if only a local DB is required, or use the built in CloudDB/tinyWebDB if online shared data is required.

The OP first needs to clearly explain what they are trying to achieve, as required by @Anke

3 Likes

3 posts were split to a new topic: In this community what does it mean when someone refers to OP?

OP = Opener of the topic (see here) or
Original Poster

(probably more the latter) or ... ?

1 Like

More:

2 Likes