CREATE TABLE IF NOT EXISTS `employees` (
`employees_id` int(11) NOT NULL AUTO_INCREMENT,
`employees_firstname` varchar(100) DEFAULT NULL,
`employees_middlename` varchar(45) DEFAULT NULL,
`employees_lastname` varchar(100) DEFAULT NULL,
`employee_gender` enum('M','F') NOT NULL,
`employees_dob` date DEFAULT NULL,
`employees_emailaddress` varchar(255) DEFAULT NULL,
`employees_password` varchar(45) DEFAULT NULL,
`employees_datejoined` date DEFAULT NULL,
`employees_code` varchar(45) DEFAULT NULL,
`employees_status` tinyint(1) DEFAULT '1',
`employees_mobile` varchar(15) DEFAULT NULL,
`employees_designation` int(11) DEFAULT NULL,
`employees_bussiness_account` int(11) DEFAULT NULL,
`employees_image` varchar(255) DEFAULT NULL,
`employees_supervisers_id` int(11) DEFAULT NULL,
`employees_work_location_id` int(11) DEFAULT NULL,
`employees_date_added` datetime DEFAULT NULL,
PRIMARY KEY (`employees_id`),
UNIQUE KEY `employees_code_UNIQUE` (`employees_code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=20 ;
--
-- Dumping data for table `employees`
--
INSERT INTO `employees` (`employees_id`, `employees_firstname`, `employees_middlename`, `employees_lastname`, `employee_gender`, `employees_dob`, `employees_emailaddress`, `employees_password`, `employees_datejoined`, `employees_code`, `employees_status`, `employees_mobile`, `employees_designation`, `employees_bussiness_account`, `employees_image`, `employees_supervisers_id`, `employees_work_location_id`, `employees_date_added`) VALUES
(16, 'Aneesh', 'C', 'S', 'M', '2012-11-05', 'aneesh.cs@calpinetech.com', '7106499a88fd79197ddbff61829993c9', '2010-12-07', 'cas927', 1, '9876543210', 1, 1, 'Betson.JPG', 0, 1, '2012-11-27 00:00:00'),
(17, 'Betson', 'T', 'Thomas', 'M', '2012-11-05', 'betson@calpinetech.com', '7106499a88fd79197ddbff61829993c9', '2008-12-06', 'cas450', 1, '9876543210', 6, 1, NULL, 16, 1, '2012-11-27 00:00:00'),
(18, 'test', 'test', 'test', 'M', '2012-11-12', 'test@calpinetech.com', '7106499a88fd79197ddbff61829993c9', '2012-11-06', 'cas999', 1, '9876543210', 1, 1, NULL, 16, 1, '2012-11-27 00:00:00'),
(19, 'asdsa', 'asdsad', 'asdsad', 'M', '2012-12-03', 'test@calpinetech.com', 'd8578edf8458ce06fbc5bb76a58c5ca4', '2012-12-24', 'ca0999', 1, '9876543210', 1, 1, NULL, 17, 1, '2012-12-04 00:00:00');
这是我的桌子。这里employees_supervisers_id
是employees_id
. 我们如何通过cakephp获取递归数据?