0

I am currently building a cordova App for Android. Now I want to run a simple sql query to increase a Number on a database every time a button in the app is clicked. How can i realize this? I mean if I run a Query client side, then someone could just run the Query million times and break the server.. I don't know how to make sure everyone can just run the query once. Has someone an idea?

thanks!

  • Expand your approach. You will have to keep track of user activity in order to restrict a person to once a day. – Dan Bracuk Oct 03 '17 at 12:52

1 Answers1

0

You have to change your approach using a table that tracks users who run the query and apply an unique key. You should identify the user with an unique identifier. Take a look here

In this way you don't need to increase an integer column. Just do a count(*) on the table and the result will be the number of clicks

Lorenzo Vincenzi
  • 1,153
  • 1
  • 9
  • 26