At 10:39 PM +0000 2000-01-08, kevin wrote:
>The query should be like this, not specifying a NULL for the current
>field. :-)
>
>INSERT INTO timetest (stuff) VALUES ('stuff');
No, actually, either way should work. But the statement below
doesn't insert NULL, it inserts 'NULL' (a string), which gets turned
into 0.
>
>>OK, here is the statement and the result:
>>
>>
>>mysql> INSERT INTO timetest VALUES ('stuff','NULL');
>>Query OK, 1 row affected (0.00 sec)
>>
>>mysql> select*from timetest;
>>+-----------+----------------+
>>| stuff | current |
>>+-----------+----------------+
>>| teststuff | 00000000000000 |
>>| stuff | 00000000000000 |
>>+-----------+----------------+
>>2 rows in set (0.00 sec)
>>
>>Still just zeros...
>>
>>KD
>>
>>
>>>On Sat, Jan 08, 2000 at 02:01:21PM -0800, Kole Dunn wrote:
>>> > Here is the statment for creating the table:
>>> > mysql> CREATE TABLE timetest (stuff VARCHAR(20), current
> TIMESTAMP);
>>> >
>>> > When I insert data, do I need to also enter something for the
>>> > timestamp? I was under the impression that it automatically displayed
>>> > a date in that field.
>>>
>>>Insert a NULL for the TIMESTAMP field. MySQL will insert the
> >>proper value.
--
Paul DuBois, paul@stripped