Gossamer Forum
Home : General : Databases and SQL :

Mysql update with cron?

Quote Reply
Mysql update with cron?
can i have a cron job that does this? :

say i have 3 columns in a table

col1 percent col3
100 20.0
95 20.0
75 15.0

i need to take values from col1 (100,95,75) and get the percentage (20%,20%,15%) of those values. then update col3 to reflect the percentage ie; 20% of 100 =20 (col3)

but, only the rows with no value in col3 need to be updated

am i making sense?
Subject Author Views Date
Thread Mysql update with cron? kewlrobert 5810 Nov 11, 2003, 6:49 PM
Thread Re: [kewlrobert] Mysql update with cron?
Stealth 5646 Nov 11, 2003, 8:11 PM
Thread Re: [Stealth] Mysql update with cron?
kewlrobert 5680 Nov 11, 2003, 8:39 PM
Post Re: [kewlrobert] Mysql update with cron?
Stealth 5593 Nov 12, 2003, 11:25 PM