Search code examples
sql-updategoogle-fusion-tablesapp-inventor

How to make an update sql in which add 1 to value existing, using App Inventor with FusionTables


I have the following table in FusionTables connected with my app in App Inventor:

enter image description here

I need to add 1 vote in my database every time that someone writes the Name of one of the participants and send it from the App.

All is functioning, but I can't make that sum occur. My code with error is:

UPDATE my_table SET Vote= Vote + 1 WHERE RowID = 'tomar GlobalRowID' 

Solution

  • You can't do math in updates with Fusion Tables SQL. You have to fetch the row, do the math, and then update it back. See the documentation for details.