Aaron Judd
|
Posted: 08/23/2003, 10:04 AM |
|
OK - no newbie here..but I have never been able to get this working properly
and it's been frustrated me ever since CCS came out..
Using MySQL when you create a "DATETIME" field the default value becomes
0000-00-00 00:00:00
and unless you explicitly insert a NULL value this is what this field will
have. This value is the same as no value.
So why hasn't CCS figured out that that this value is NOT:
12/01/0000
Which once the record is updated by CCS the DB now has:
0000-12-01 00:00:00
and.. wham all the dates are screwed and meaningless.
So please.. why doesn't CCS just realize that 0000-00-00 00:00:00 is the
same a blank field and not mess with it?
Anyone else fought this? Maybe someone can clear the fog from my brain on
this one...
(Oh, and I won't even get into CCS dealing with MySQL "TimeStamp" fields)
-aron
|
|
|
DonB
|
Posted: 08/26/2003, 6:45 PM |
|
You lost me, maybe.
"0000-00-00 00:00:00" is not NULL, and it sounds like your field contains
something (zero-length string?) and not a "real" NULL. The date/time
conversion apparently parses the empty string and assembles a bunch of
zeros, giving you this result.
CCS also probably assumes that unless otherwise specified by you, that an
empty date field defaults to "0000-12-01 00:00:00". Most languages have
some representation of "the oldest value that is considered a valid date".
For ASP (VB), this is December 30, 1899 12:00:00 AM (stored internally as
the value "zero"). I assume you might be using PHP, and I don't know what
they might do to handle this concept.
Why not add field validation to assure you have values you want in your
database, instead of accepting the defaults that CCS uses? If the defaults
are clearly and undeniably wrong (in the general sense, not just your
specific case), be sure to inform http://support.codecharge.com of this so
they can correct it in the next release. I personally don't let things
default to "system defaults", which is probably why I have not had an issue
like what you described.
--
DonB
http://www.gotodon.com/ccbth
"Aaron Judd" <aaronjudd@coolersites.com> wrote in message
news:bi86rj$53q$1@news.codecharge.com...
> OK - no newbie here..but I have never been able to get this working
properly
> and it's been frustrated me ever since CCS came out..
>
> Using MySQL when you create a "DATETIME" field the default value becomes
>
> 0000-00-00 00:00:00
>
> and unless you explicitly insert a NULL value this is what this field will
> have. This value is the same as no value.
>
> So why hasn't CCS figured out that that this value is NOT:
>
> 12/01/0000
>
> Which once the record is updated by CCS the DB now has:
>
> 0000-12-01 00:00:00
>
> and.. wham all the dates are screwed and meaningless.
>
> So please.. why doesn't CCS just realize that 0000-00-00 00:00:00 is the
> same a blank field and not mess with it?
>
> Anyone else fought this? Maybe someone can clear the fog from my brain on
> this one...
>
>
> (Oh, and I won't even get into CCS dealing with MySQL "TimeStamp" fields)
>
> -aron
|
|
|
|