# Adding Databases up with a button

**URL:** <https://forum.wixstudio.com/t/adding-databases-up-with-a-button/4036>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [October 4, 2018, 2:51am UTC](https://forum.wixstudio.com/t/adding-databases-up-with-a-button/4036 "2018-10-04T02:51:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![liamtfoss](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@liamtfoss](https://forum.wixstudio.com/u/liamtfoss)\
**Post date:** [October 4, 2018, 2:51am UTC](https://forum.wixstudio.com/t/adding-databases-up-with-a-button/4036/1 "2018-10-04T02:51:33Z")

</div>

Hey i was trying to make a button that gets a “number” value from a certain database and adds a certain amount to it. Is this possible or should i figure out a different way to do it? Im new to wix code and im not very good. Thank You.

EX. Number = 2

- A button labeled “+2” is clicked and the number changes to a 4.

---

<div class="post-metadata">

**Author:** ![ahmdjsalhi](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/ahmdjsalhi/32/6516_2.png) [@ahmdjsalhi](https://forum.wixstudio.com/u/ahmdjsalhi)\
**Post date:** [October 4, 2018, 3:24am UTC](https://forum.wixstudio.com/t/adding-databases-up-with-a-button/4036/2 "2018-10-04T03:24:23Z")

</div>

Hey!

[![](https://us1.discourse-cdn.com/wix/original/3X/0/6/0647c8839ba525c3fafc426b9c5ecab5b8c5319f.jpeg "Wix Code | How to Create a Custom Form & Connect It to a Database") ](https://www.youtube.com/watch?v=EbwJWRlBsNw)

[![](https://us1.discourse-cdn.com/wix/original/3X/0/0/005a87403b53b740710c7d9b789c89ccc079c81d.jpeg "How to Use a Dataset") ](https://www.youtube.com/watch?v=YNPEWsMVgjo)

check this video to know more about collections and how to connect it to your fields.

you need to make a dataset and connect a text field with number you retrieved from database and change it after pressing the button by (onClick) method

> **[Button - Velo API Reference - Wix.com](https://www.wix.com/velo/reference/$w/button)**
>
> A button on your site.

and maybe you want to know how to update the value you doubled in the database “after making the write permission”

> **[wix-data - Velo API Reference - Wix.com](https://www.wix.com/velo/reference/wix-data)**
>
> The wix-data module contains functionality for working with data in collections.

I recommend you to read more and watch more videos about wix code before starting a real coding.  
this would help you out.

> **[Velo by Wix | Examples | Wix.com](https://www.wix.com/velo/examples)**
>
> Velo by Wix Examples - Explore example sites depicting different capabilities of using Velo. Aim for developers on all expertise levels.

good luck! 😉

---

<div class="post-metadata">

**Author:** ![liamtfoss](https://avatars.discourse-cdn.com/v4/letter/l/c89c15/32.png) [@liamtfoss](https://forum.wixstudio.com/u/liamtfoss)\
**Post date:** [October 4, 2018, 10:50pm UTC](https://forum.wixstudio.com/t/adding-databases-up-with-a-button/4036/3 "2018-10-04T22:50:52Z")

</div>

Thank You very much!
