xe****@aol.com (todd) wrote in
news:4c**************************@posting.google.c om:
i have a site that displays shows. i am getting my date from a mysql
function "CURDATE()" but it give me the date one day ahead of the
actual date. i tried $myrow[8] -1 but that doen't work. im sure iknow
what to do but its not hitting the brain right now. and the client
wants a fix asap please help
thanks
Set the time correctly on the server?
More to the point, if the time on the server is out by (say) 16 hours
(because of timezone differences or reading time in GMT or something)
you could always modify it by using SELECT SUBDATE(CURDATE(),INTERVAL 16
HOUR) -- which then returns a full timestamp, so SUBDATE(NOW(),...) may
be more accurate...
Of course, if all you want is to subtract 1 day,
SUBDATE(CURDATE(),INTERVAL 1 DAY) will do it.
Pete.