Hi all,

Thanks for the help.

However I have additional issue with UPDATE statement :-(
I can understand what's wrong with my table/query going on, so could some one
explain me why UPDATE statemen do that strange thing...?

My table is:
CREATE TABLE `some` (
  `id` bigint(20) NOT NULL auto_increment,
  `name` varchar(100) NOT NULL default '',
  `start_date` timestamp(14) NOT NULL,
  `end_date` timestamp(14) NOT NULL,
  `biling_date` timestamp(14) NOT NULL,
  `confirm_date` timestamp(14) NOT NULL,
  `final_date` timestamp(14) NOT NULL,
  `concl_date` timestamp(14) NOT NULL,
  `max_count` int(11) NOT NULL default '0',
  `remain_count` int(11) NOT NULL default '0',
  `single_rooms` int(11) NOT NULL default '0',
  `twin_rooms` int(11) NOT NULL default '0',
  `single_avail` int(11) NOT NULL default '0',
  `twin_avail` int(11) NOT NULL default '0',
  `current_tour` char(1) NOT NULL default '0',
  `todo` varchar(10) NOT NULL default 'EMAIL',
  `active_tour` char(1) NOT NULL default 'Y',
  `price` varchar(10) NOT NULL default '',
  `deposit` varchar(10) NOT NULL default '',
  `comments` text NOT NULL,
  `last_updated` timestamp(14) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `start_date` (`start_date`),
  KEY `end_date` (`end_date`)
) TYPE=MyISAM;

And follow query:
(1) UPDATE some SET current_tour='1' WHERE id = some_id

This query always update "start_date" field with NOW() value, i.e. above query
is treated from MySQL as:
(2) UPDATE some SET start_date=NOW(),current_tour='1' WHERE id = some_id

To fix that stupid thing I run above query(1) like:
UPDATE some SET start_date=start_date,current_tour='1' WHERE id = some_id

which looks so,so stupid to me...
That issue doesn't exist on "end_date" or some other timestamp field...

I'm currently using 4.0.13-max.

Thanks.<a 
href='http://mail.bg/ads/adclick.php?bannerid=883&amp;zoneid=13&amp;source=&amp;ismap='
 target='_blank'><br><br>
Елате на Home Techno 2003<br>
в Интер Експо Център и <br>
спечелете плазма Hyundai,<br>
кухня Cogneliano,<br>
аудио система Energy и<br>
още награди за всеки<br><br><br></a><div id="beacon_883" style="position: absolute; 
left: 0px; top: 0px; visibility: hidden;"><img 
src='http://mail.bg/ads/adlog.php?bannerid=883&amp;clientid=294&amp;zoneid=13&amp;source=&amp;block=0&amp;capping=0&amp;cb=1975971a54e26ea4ba467eadc98435ed'
 width='0' height='0' alt='' style='width: 0px; height: 0px;'></div>

Reply via email to