Re: Question about date()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 1:08 PM +0100 10/7/08, Stut wrote:
On 7 Oct 2008, at 12:48, Jason Pruim wrote:
Thanks for the quick response... You were right... I did a var_dump both on $row['timein'] and $row['timeout'] and the error was because of the way that I update the records. for time in, I insert a new record, for time out, I update the record where timeout= NULL and THAT is what was causing the issue... I guess I can just redirect that error, ignore it, or come up with a different way to update the current record without having to use NULL, or maybe, write a timeout timestamp for like midnight on January 1 1955 or something like that...

Try "is null" rather than "= null".

-Stut

Yes, if I remember correctly, NULL is a different critter for MySQL as compared to php. You can't directly test (i.e., make comparisons) for it like you can in php.

As far as updating the time of the record, why not use current date or 1/1/1970 -- the beginning of the world according to Unix. You never know if you might have to update your dB to Unix time at some time in the future.

Cheers,

tedd

--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux