For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > June 2005 > Re: [PHP-DB] Issue with date() function...









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] Issue with date() function...
Chris

2005-06-10, 3:56 pm

Well, without seeing your query (it's much more likely some will be able
and willing to help you the more information you give) It appears that
you aren't surrounding the date in quotes? So it is being parsed as the
expression 2005 (minus) 6 (minus) 10 Instead of seeing it as the
string '2005-06-10' then converting to a date.

Chris

Chase wrote:

>I have a variable:
> $rec2day = date("Y-m-d");
>that displays correctly when echoed to the screen, but when I write it to my
>DB, I get the mathmatical answer to the equasion (1989 (2005-06-10)).
>
>What do I need to do to correct this??
>
>TIA
>
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com