it worked for me: mysql> describe t_timesheet; +--------+---------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +--------+---------------+------+-----+---------+----------------+ | id | int(11) | | PRI | NULL | auto_increment | | ts_h | decimal(10,0) | YES | | NULL | | | ts_pid | int(11) | YES | | NULL | | | ts_day | text | YES | | NULL | | +--------+---------------+------+-----+---------+----------------+ 4 rows in set (0.00 sec)
mysql> select * from t_timesheet; +----+------+--------+----------------+ | id | ts_h | ts_pid | ts_day | +----+------+--------+----------------+ | 1 | 0 | 60 | 20020328000000 | +----+------+--------+----------------+ 1 row in set (0.00 sec) mysql> update t_timesheet set ts_h=1 where ts_pid=60 and ts_day="20020328000000"; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> select * from t_timesheet; +----+------+--------+----------------+ | id | ts_h | ts_pid | ts_day | +----+------+--------+----------------+ | 1 | 1 | 60 | 20020328000000 | +----+------+--------+----------------+ 1 row in set (0.00 sec) -----Original Message----- From: LeTortorec, Jean-Louis [mailto:[EMAIL PROTECTED]] Sent: Monday, April 08, 2002 4:17 PM To: '[EMAIL PROTECTED]' Subject: Strange behavior I have a table with the following fields: id=autoincrement, int (11) ts_h=decimal ts_pid=int (11) ts_day=text There is a unique record where ts_pid=60 and ts_day="20020328000000" (ts_h=0). If I do [update t_timesheet set ts_h=0 where ts_pid=60 and ts_day="20020328000000" ], every thing works fine. (nothing is changed because the values remain the same) But if I change the query to ts_h=1: [update t_timesheet set ts_h=1 where ts_pid=60 and ts_day="20020328000000" ] The record is deleted instead of being update. I changed ts_h to a decimal, or integer, same behavior. It deletes my record instead of updating it. Any idea why this occurs? Thank you. Jean-Louis --------------------------------------------------------------------- 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