[Phpmyadmin-devel] Zoom-search and dates

Marc Delisle marc at infomarc.info
Tue Aug 2 18:54:48 CEST 2011


Ammar,

Zoom-search of date values needs improvement. Here is an example table:

CREATE TABLE IF NOT EXISTS `birthday` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `name` varchar(50) NOT NULL,
   `birthday` date NOT NULL,
   PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;


INSERT INTO `birthday` (`id`, `name`, `birthday`) VALUES
(1, 'A', '1950-01-01'),
(2, 'B', '1950-02-02'),
(3, 'C', '1960-03-03'),
(4, 'D', '2000-04-04');

Generating a plot via zoom-search show that the same time elapsed 
between two days (in 1950) than in ten or forty years.

If you could convert these dates to a number of days (probably at the 
Javascript layer), the same way than in MySQL [0], you would get 
meaningful results. Of course you still need to display the unconverted 
date value.

[0] 
http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_to-days

-- 
Marc Delisle
http://infomarc.info




More information about the Developers mailing list