automatically change database value

i have three column in my table 1)id 2)expiry_date 3)date_diff

if above table has following data 1 2013-12-1 3

Date difference between expiry date & today date that to be save be third column

also 3rd column value change(Dynamically) according to system date.

You should not be store a calculated value in the database. Just do the calculation on the fly as you need it.

Sponsor our Newsletter | Privacy Policy | Terms of Service