sunny

OK guys thanks for the help so far, I don't really know what is wrong with my lo …

Wed 15 Nov, 2017 08:22 pm
OK guys thanks for the help so far, I don't really know what is wrong with my local server or maybe as a novice concern.

I want to compare two dates (column) such that if the expiring date is due in 3 months I want to change the record in due_notice from 0 to 1. something like that. not that I don't google, the online community suggested datediff or dateadd and some others but trying it out on the sql panel in phpmyadmin it doesn't seem to work.

I believe people here can understand my problem more

Comments

Lord Jerry

Thu 16 Nov, 2017 05:04 am
If i get u right u wanna compare 2 dates so when d 1st date equals to d other date u want a record in the database to change from 0 to1..
If u are using php i think u can achieve that

U put 2 dates in a variable u den compare them if the first date equals d expiry..
U write an sql update query to change d record from 0 to 1.

I dont know anything about php date yet i would have dropped a code

dhtml

Thu 16 Nov, 2017 10:22 am
You failed to tell us how you stored the date in the database too. Did you use date fields and mysql dates, or php time() stamp?

sunny

Thu 16 Nov, 2017 12:47 pm
I used date data type and used php strtotime function to get the date in php.