tags:

views:

49

answers:

3

I have a site which has client side and admin side. There is a table called account History. which contains fields like uid | accountBalance | PaymentStatus | Date.

Now this table has to be updated every month for all the paid users and the table is bulk. So what is the best way to update the table every month.Do i need to select all the uid's and update.

A: 
UPDATE History
SET accountBalance=val1, PaymentStatus=val2, Date=val3,
WHERE PaymentStatus=true

I do not know what the values are, but it should look something like this :)

BryCry
I want to update this table for all the users in the table. each users balance will be calculated on the fly and update it
A: 

you can use something like following query.

update history SET PaymentStatus="Paid" where accountBalance>00
Salil
A: 

Actually am using windows OS so i guess cron job is not possible. Moreover if i update it through my application i.e through admin then also it will be very tedious job,Because the table will contain huge data.If you need more clarification let me know.

Thanks