开发者

Bulk Update in MYSQL

I have a site which has client side and admin side. There is a table called account History. which contains fields like u开发者_如何学JAVAid | 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.


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 :)


you can use something like following query.

update history SET PaymentStatus="Paid" where accountBalance>00


you can create an windows service to call either an executable or to post data to a web page; add a timer inside your windows service and it acts exactly like a cron job.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜