Re: Question about date()
| From: | tedd | Date: | Tue, 07 Oct 2008 12:22:07 +0000 |
| Subject: | Re: Question about date() | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-281531@lists.php.net to get a copy of this message | ||
At 1:08 PM +0100 10/7/08, Stut wrote:
On 7 Oct 2008, at 12:48, Jason Pruim wrote: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.comThanks 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