Is it too late to change the way you insert dates into the DB?  I really
think the unix timestamp is the easiest way to store dates... comparisons
are easy, because everything is in seconds, and using date() gives you the
ability to re-format your dates over and over again for presentation
purposes.

Just my 2 cents :)


Justin




on 11/11/02 4:04 PM, Michael P. Carel ([EMAIL PROTECTED]) wrote:

> 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

Justin French
--------------------
Creative Director
http://Indent.com.au
Web Developent & 
Graphic Design
--------------------


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to