change timestamp to datetime.

have a look in the manual:
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#DAT
ETIME

-Kim


-----Original Message-----
From: David Nagel [mailto:[EMAIL PROTECTED]]
Sent: 29. november 2001 21:01
To: [EMAIL PROTECTED]
Subject: Having trouble with UPDATE


I'm having a little trouble with an UPDATE statement in MySQL 3.23.39 on
Mac OS 10.0. The statement is:

UPDATE book SET book_deleted = 'Y' WHERE book_id = '123';

This statement updates the column that I specified and another as well. A
timestamp(14) column is changed to today's date as well.

Here's what the table looks like:

CREATE TABLE `book` (
  `book_id` int(10) unsigned NOT NULL default '0',
  `event_id` int(10) unsigned NOT NULL default '0',
  `book_deleted` enum('N','Y') NOT NULL default 'N',
  `room` varchar(20) NOT NULL default '',
  `start` timestamp(14) NOT NULL,
  `end` timestamp(14) NOT NULL,
  `attendance` int(3) default NULL,
  `equip` char(1) NOT NULL default 'N',
  `staff` char(1) NOT NULL default 'N',
  `catering` char(1) NOT NULL default 'N',
  `details` char(1) NOT NULL default 'N',
  PRIMARY KEY  (`book_id`),
  UNIQUE KEY `book_id` (`book_id`),
  KEY `event_id` (`event_id`)
) TYPE=MyISAM PACK_KEYS=1

After the UPDATE the value of book_deleted is 'Y' and the value of start is
changed to now(). Any ideas on why this is happening?

--
David Nagel
Director of Communications & Information Services
U of R Students' Union
Regina, SK, S4S 0A2


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail
<[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to