On Wed 07 Jun 2006 06:55:47p, Eiolon wrote in
macromedia.dreamweaver.appdev:
> I have a column in a MySQL database:
>
> datestamp DATE
>
> I am using Dreamweaver 8 with PHP and trying to use the
insert record
> form. When it inserts the record, it does not record the
date.
> That's probably because it says 'datestamp' does not get
a value. How
> do I get it to have a value without make a new form
field for it?
Create it in the table - in MySQL 4.1, it should be a field
type
"timestamp", and you probably shouldn't use the keyword DATE
for the
name. Don't include anything on the form for it; when the
record is
inserted, it will automatically get a value.
--
-- Table structure for table `eiolon`
--
CREATE TABLE `eiolon` (
`eTimeStamp` timestamp NOT NULL default CURRENT_TIMESTAMP on
update
CURRENT_TIMESTAMP,
`myTextField` text NOT NULL,
`myVarCharField` varchar(10) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
In your form, you'd only have inputs for `myTextField` and
`myVarCharField` fields.
http://dev.mysql.com/doc/refman/5.0/en/datetime.html