Welcome Guest, Not a member yet? Register   Sign In
need help about database query builder
#1

(This post was last modified: 05-21-2017, 03:20 PM by ngangchill.)

e.g

table: points

userId   |  totalPoints

1    |    1000
2    |    500
3    |    2000
....................
...........


so ,
i have a 20 to 30 sets of raw data[userId/totalPoints] that i want to update points table.

condition:
1.  if raw data [total points] is greater then original value that presents in database , then i need to update points table data with raw data .

2. if raw data [total points] is less then original value that presents in database , then i raw data (totalpoints) will be added with original value present in database.


so, how can i write database query for this problem??


Thanks for help.
Reply


Messages In This Thread
need help about database query builder - by ngangchill - 05-21-2017, 03:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB