date comparison

From: Date: Mon, 11 Nov 2002 06:04:35 +0000
Subject: date comparison
Groups: php.general 
Request: Send a blank email to php-general+get-123773@lists.php.net to get a copy of this message
hi to all again, I have a problem here again regarding the date comparison. I need to check the most recent date that was entered in mysql database in date format ("Y-m-d"), if the datetoday is a day or two days in advanced compared to the queried date. I need to make sure that the next inserted date in the mysql database whould be the next day of the last inserted date. Any idea how? Please help. Im trying to do something like this: //checking the queried date $querieddate=(2002-11-02); $incrementdate=date("$querieddate"),mktime(0,0,0,date(m), date(d)+1,date(Y))); $datetoday=("Y-m-d"); if($incrementdate == $datetoday){ //insert $datetoday to the mysql database }else{ //insert $incrementdate to the mysql database } regards , mike

« previous php.general (#123773) next »