我想用phpmysql如何使用phpmysql進行考勤查看?
以下是我的出勤表,以使像this考勤觀點:
`CREATE TABLE IF NOT EXISTS `attendance` (
`aid` int(11) NOT NULL AUTO_INCREMENT,
`Name_of_Student` varchar(100) COLLATE latin1_general_ci NOT NULL,
`Class` varchar(20) COLLATE latin1_general_ci NOT NULL,
`Roll_no` int(11) NOT NULL,
`Section` varchar(20) COLLATE latin1_general_ci NOT NULL,
`Status` binary(1) NOT NULL,
`time` varchar(20) COLLATE latin1_general_ci NOT NULL,
`Date` date NOT NULL,
PRIMARY KEY (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci AUTO_INCREMENT=33 ;
--
-- Dumping data for table `attendance`
--
INSERT INTO `attendance` (`aid`, `Name_of_Student`, `Class`, `Roll_no`, `Section`, `Status`, `time`, `Date`) VALUES
(1, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Morning', '2013-07-01'),
(2, 'Zonundanga', 'X', 5, 'A', 'Y', 'Morning', '2013-07-01'),
(3, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Morning', '2013-07-02'),
(4, 'Zonundanga', 'X', 5, 'A', 'Y', 'Morning', '2013-07-02'),
(5, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Morning', '2013-07-03'),
(6, 'Zonundanga', 'X', 5, 'A', 'Y', 'Morning', '2013-07-03'),
(7, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Morning', '2013-07-04'),
(8, 'Zonundanga', 'X', 5, 'A', 'Y', 'Morning', '2013-07-04'),
(9, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Morning', '2013-07-05'),
(10, 'Zonundanga', 'X', 5, 'A', 'Y', 'Morning', '2013-07-05'),
(11, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Morning', '2013-07-06'),
(12, 'Zonundanga', 'X', 5, 'A', 'Y', 'Morning', '2013-07-06'),
(13, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Morning', '2013-07-07'),
(14, 'Zonundanga', 'X', 5, 'A', 'Y', 'Morning', '2013-07-07'),
(15, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Morning', '2013-07-08'),
(16, 'Zonundanga', 'X', 5, 'A', 'Y', 'Morning', '2013-07-08'),
(17, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Afternoon', '2013-07-01'),
(18, 'Zonundanga', 'X', 5, 'A', 'Y', 'Afternoon', '2013-07-01'),
(19, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Afternoon', '2013-07-02'),
(20, 'Zonundanga', 'X', 5, 'A', 'Y', 'Afternoon', '2013-07-02'),
(21, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Afternoon', '2013-07-03'),
(22, 'Zonundanga', 'X', 5, 'A', 'Y', 'Afternoon', '2013-07-03'),
(23, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Afternoon', '2013-07-04'),
(24, 'Zonundanga', 'X', 5, 'A', 'Y', 'Afternoon', '2013-07-04'),
(25, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Afternoon', '2013-07-05'),
(26, 'Zonundanga', 'X', 5, 'A', 'Y', 'Afternoon', '2013-07-05'),
(27, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Afternoon', '2013-07-06'),
(28, 'Zonundanga', 'X', 5, 'A', 'Y', 'Afternoon', '2013-07-06'),
(29, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Afternoon', '2013-07-07'),
(30, 'Zonundanga', 'X', 5, 'A', 'Y', 'Afternoon', '2013-07-07'),
(31, 'Lalchhandami', 'X', 1, 'A', 'Y', 'Afternoon', '2013-07-08'),
(32, 'Zonundanga', 'X', 5, 'A', 'N', 'Afternoon', '2013-07-08');`
請誰能幫助我?
你至少可以去格式化你的代碼正確 – Bojangles