At 5:22 PM +0200 10/2/01, Malko Malko wrote: >>Description: > When multiplying a date field with a number( any type ) field >for some values in any of these 2 fields mysql did nt answer to >queries. >>How-To-Repeat: ># ># Table structure for table 'testdate' ># > >CREATE TABLE testdate ( > ID int(11) NOT NULL auto_increment, > DATE time DEFAULT '00:00:00' NOT NULL, > coef decimal(4,2) DEFAULT '0.00' NOT NULL, > PRIMARY KEY (ID) >); > ># ># Dumping data for table 'testdate' ># > >INSERT INTO testdate VALUES( '1', '15:54:52', '0.75'); >INSERT INTO testdate VALUES( '2', '00:17:21', '0.75'); >INSERT INTO testdate VALUES( '3', '00:10:00', '0.75'); > >when executing this query : >mysql> select date,coef,sec_to_time(time_to_sec(date*coef)) from testdate;
Don't you mean sec_to_time(time_to_sec(date)*coef) instead? >+----------+------+-------------------------------------+ >| date | coef | sec_to_time(time_to_sec(date*coef)) | >+----------+------+-------------------------------------+ >| 15:54:52 | 0.75 | NULL | >| 00:17:21 | 0.75 | NULL | >| 00:10:00 | 0.75 | 00:07:50 | >+----------+------+-------------------------------------+ >3 rows in set (0.00 sec) > -- Paul DuBois, [EMAIL PROTECTED] --------------------------------------------------------------------- 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