-- https://www.phpmyadmin.net/
--

START TRANSACTION;



-- --------------------------------------------------------

--
-- Table structure for table `attendance`
--

CREATE TABLE `attendance` (
  `id` int(11) NOT NULL,
  `student_name` varchar(255) NOT NULL,
  `class` varchar(100) NOT NULL,
  `section` varchar(100) NOT NULL,
  `exam` varchar(100) NOT NULL,
  `exam_year` varchar(100) NOT NULL,
  `attendance` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `attendance`
--

INSERT INTO `attendance` (`id`, `student_name`, `class`, `section`, `exam`, `exam_year`, `attendance`) VALUES
(2, 'Andrew Stephen', 'Year 7', 'Lily', '2nd Term', '2022', 90),
(3, 'Blessing Okoro', 'Year 7', 'Lily', '2nd Term', '2022', 90),
(4, 'Obagho David', 'Year 7', 'Lily', '2nd Term', '2022', 110),
(5, 'Amaka Israel', 'Year 7', 'Lily', '2nd Term', '2022', 90),
(6, 'Blessing Praise', 'Year 7', 'Lily', '2nd Term', '2022', 100),
(7, 'Amaka Israel', 'Year 8', 'Lily', '1st Term', '2022', 80),
(10, 'Blessing Praise', 'Year 8', 'Lily', '1st Term', '2022', 0),
(11, 'Obagho David', 'Year 8', 'Lily', '1st Term', '2022', 120),
(12, 'Amalu Ifeanyi', 'Year 8', 'Lily', '1st Term', '2022', 0),
(13, 'Gloria Smith', 'Year 8', 'Lily', '1st Term', '2022', 90),
(14, 'Grace Kalu', 'Year 8', 'Lily', '1st Term', '2022', 0),
(15, 'Amaka Israel', 'Year 8', 'Lily', '1st Term', '2022', 80),
(16, 'Amalu Ifeanyi', 'Year 8', 'Lily', '1st Term', '2022', 0),
(17, 'Andrew Stephen', 'Year 8', 'Lily', '1st Term', '2022', 0),
(18, 'Blessing Okoro', 'Year 8', 'Lily', '1st Term', '2022', 0),
(19, 'Blessing Praise', 'Year 8', 'Lily', '1st Term', '2022', 0),
(20, 'Gloria Smith', 'Year 8', 'Lily', '1st Term', '2022', 90),
(21, 'Grace Kalu', 'Year 8', 'Lily', '1st Term', '2022', 0),
(22, 'Obagho David', 'Year 8', 'Lily', '1st Term', '2022', 0);

-- --------------------------------------------------------

--
-- Table structure for table `card_expire_date`
--

CREATE TABLE `card_expire_date` (
  `id` int(11) NOT NULL,
  `expire_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `card_expire_date`
--

INSERT INTO `card_expire_date` (`id`, `expire_date`) VALUES
(1, '2024-01-06');

-- --------------------------------------------------------

--
-- Table structure for table `card_usage_limit`
--

CREATE TABLE `card_usage_limit` (
  `id` int(11) NOT NULL,
  `card_limit` int(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `card_usage_limit`
--

INSERT INTO `card_usage_limit` (`id`, `card_limit`) VALUES
(1, 4);

-- --------------------------------------------------------

--
-- Table structure for table `classes`
--

CREATE TABLE `classes` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `class_numeric` int(11) NOT NULL,
  `teacher_name` varchar(100) NOT NULL,
  `note` text NOT NULL,
  `show_position` varchar(10) NOT NULL DEFAULT 'yes'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `classes`
--

INSERT INTO `classes` (`id`, `name`, `class_numeric`, `teacher_name`, `note`, `show_position`) VALUES
(1, 'Year 9', 9, 'teacher 2', '', 'yes'),
(3, 'Year 7', 7, 'Okeme David', '', 'yes'),
(4, 'Year 8', 8, 'teacher 4', '', 'no'),
(5, 'Year 10', 10, 'Okeme David', '', 'yes'),
(6, 'Year 11', 11, 'Okeme David', '', 'yes'),
(7, 'SS3', 12, 'Amaka Gibson', '', 'yes'),
(9, 'SS3_2022_2023', 13, 'Okeme David', '', 'yes');

-- --------------------------------------------------------

--
-- Table structure for table `comments`
--

CREATE TABLE `comments` (
  `id` int(11) NOT NULL,
  `student_name` varchar(255) NOT NULL,
  `class` varchar(100) NOT NULL,
  `section` varchar(100) NOT NULL,
  `exam` varchar(100) NOT NULL,
  `exam_year` varchar(100) NOT NULL,
  `class_teacher_comment` mediumtext NOT NULL,
  `principal_comment` mediumtext NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `comments`
--

INSERT INTO `comments` (`id`, `student_name`, `class`, `section`, `exam`, `exam_year`, `class_teacher_comment`, `principal_comment`) VALUES
(2, 'Andrew Stephen', 'Year 7', 'Lily', '2nd Term', '2022', '', ''),
(4, 'Obagho David', 'Year 7', 'Lily', '2nd Term', '2022', 'Great Result, keep it up.', 'He did extremely well. Keep getting better.'),
(6, 'Blessing Okoro', 'Year 7', 'Lily', '2nd Term', '2022', 'A nice result', 'He did great but can make it better.'),
(7, 'Blessing Praise', 'Year 7', 'Lily', '2nd Term', '2022', '', ''),
(8, 'Amalu Ifeanyi', 'Year 8', 'Lily', '1st Term', '2022', '', ''),
(9, 'Gloria Smith', 'Year 8', 'Lily', '1st Term', '2022', 'A great result. keep it up', 'A wonderful, Keep doing good.'),
(10, 'Grace Kalu', 'Year 7', 'Lily', '1st Term', '2022', '', ''),
(11, 'Amaka Israel', 'Year 8', 'Lily', '1st Term', '2022', '', ''),
(12, 'Amalu Ifeanyi', 'Year 8', 'Lily', '1st Term', '2022', '', ''),
(13, 'Andrew Stephen', 'Year 8', 'Lily', '1st Term', '2022', '', ''),
(14, 'Blessing Okoro', 'Year 8', 'Lily', '1st Term', '2022', '', ''),
(15, 'Blessing Praise', 'Year 8', 'Lily', '1st Term', '2022', 'Nice Result', 'wonderful result'),
(16, 'Gloria Smith', 'Year 8', 'Lily', '1st Term', '2022', 'A great result. keep it up', 'A wonderful, Keep doing good.'),
(17, 'Grace Kalu', 'Year 8', 'Lily', '1st Term', '2022', '', ''),
(18, 'Obagho David', 'Year 8', 'Lily', '1st Term', '2022', 'A great result. keep it up', 'A wonderful, Keep doing good.');

-- --------------------------------------------------------

--
-- Table structure for table `exams`
--

CREATE TABLE `exams` (
  `id` int(11) NOT NULL,
  `name` varchar(200) NOT NULL,
  `date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `exams`
--

INSERT INTO `exams` (`id`, `name`, `date`) VALUES
(1, '1st Term', '2021-10-23'),
(2, '2nd Term', '2021-12-17'),
(3, '3rd Term', '2022-12-03');

-- --------------------------------------------------------

--
-- Table structure for table `general_settings`
--

CREATE TABLE `general_settings` (
  `id` int(11) NOT NULL,
  `school_tagline` varchar(255) NOT NULL,
  `school_name` varchar(255) NOT NULL,
  `phone_no` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `address` varchar(255) NOT NULL,
  `footer` varchar(255) NOT NULL,
  `next_term_begins` varchar(255) NOT NULL,
  `current_school_session` varchar(200) NOT NULL,
  `no_times_school_open` int(11) NOT NULL,
  `logo` varchar(255) NOT NULL,
  `admin_login_bg` varchar(255) NOT NULL,
  `student_login_bg` varchar(255) NOT NULL,
  `teacher_login_bg` varchar(255) NOT NULL,
  `main_url` varchar(255) NOT NULL,
  `reg_no_prefix` varchar(10) NOT NULL,
  `terminal_report_bg_image` varchar(255) NOT NULL,
  `school_website` varchar(255) NOT NULL,
  `school_stamp` varchar(255) NOT NULL,
  `principal_name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `general_settings`
--

INSERT INTO `general_settings` (`id`, `school_tagline`, `school_name`, `phone_no`, `email`, `address`, `footer`, `next_term_begins`, `current_school_session`, `no_times_school_open`, `logo`, `admin_login_bg`, `student_login_bg`, `teacher_login_bg`, `main_url`, `reg_no_prefix`, `terminal_report_bg_image`, `school_website`, `school_stamp`, `principal_name`) VALUES
(1, 'Citadel of Divine Knowledge & Redemption', 'TOBBLES SCHOOLS', '07016777864', 'tobbles_schools@gmail.com', '42, Abule Oko Road, Okungbolu, Oko Town, 8, Dada Close Off Falemara Williams Avenue, Adiyan', 'Tobbles Schools', '2025-09-15', '2025/2026', 100, 'pci_logo.png', 'school-banner.jpg', '1.jpg', 'badagry.jpg', 'http://localhost/resultapp-v22', 'PCIS', 'bg-logo.png', 'https://prince-charels.org', 'stamp.png', 'Mr. Ambrose');

-- --------------------------------------------------------

--
-- Table structure for table `grade`
--

CREATE TABLE `grade` (
  `id` int(11) NOT NULL,
  `grade_name` varchar(20) NOT NULL,
  `grade_point` varchar(11) NOT NULL,
  `mark_from` int(11) NOT NULL,
  `mark_upto` int(11) NOT NULL,
  `note` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `grade`
--

INSERT INTO `grade` (`id`, `grade_name`, `grade_point`, `mark_from`, `mark_upto`, `note`) VALUES
(2, 'A1', '4.50', 75, 89, 'Excellent'),
(3, 'B2', '4.00', 70, 74, 'very good'),
(4, 'B3', '3.50', 65, 69, 'very good'),
(5, 'A+', '5.00', 90, 100, 'Distinction'),
(6, 'C5', '3.0', 60, 64, 'good'),
(7, 'C4', '2.50', 55, 59, 'credit'),
(8, 'C6', '2.00', 50, 54, 'credit'),
(9, 'D7', '1.50', 45, 49, 'pass'),
(10, 'E8', '1.00', 40, 44, 'pass'),
(12, 'F9', '0.00', 0, 39, 'fail');

-- --------------------------------------------------------

--
-- Table structure for table `pins`
--

CREATE TABLE `pins` (
  `id` int(11) NOT NULL,
  `pin_code` varchar(100) NOT NULL,
  `expire_date` date NOT NULL,
  `date_issued` date NOT NULL,
  `used_by` varchar(255) NOT NULL,
  `status` varchar(10) NOT NULL,
  `card_usage` int(10) NOT NULL,
  `card_availability` varchar(50) NOT NULL DEFAULT 'open'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pins`
--

INSERT INTO `pins` (`id`, `pin_code`, `expire_date`, `date_issued`, `used_by`, `status`, `card_usage`, `card_availability`) VALUES
(2, '9257898434', '2023-01-10', '2022-09-27', 'Obagho David', '1', 3, 'close'),
(3, '6428596298', '2023-01-10', '2022-09-27', 'Obagho David', '1', 4, 'close'),
(4, '5514995962', '2023-01-10', '2022-10-20', 'Obagho David', '1', 2, 'close'),
(5, '2981791711', '2023-01-10', '2022-11-04', 'Gloria Smith', '1', 4, 'close'),
(6, '6239495706', '2023-01-10', '2022-11-04', 'Gloria Smith', '1', 2, 'open'),
(7, '5532994620', '2023-01-10', '2022-11-25', 'Obagho David', '1', 3, 'open'),
(8, '5947991877', '2023-01-10', '2023-07-06', 'Amaka Isreal', '1', 1, 'open'),
(9, '2531092314', '2023-01-10', '2023-07-06', 'Obagho David', '1', 1, 'open'),
(11, '2694190545', '2024-01-06', '2023-07-07', 'Amaka Israel', '1', 4, 'close'),
(12, '4022092224', '2024-01-06', '2023-07-07', 'Amaka Israel', '1', 3, 'open');

-- --------------------------------------------------------

--
-- Table structure for table `results`
--

CREATE TABLE `results` (
  `id` int(11) NOT NULL,
  `name_of_student` varchar(255) NOT NULL,
  `class` varchar(255) NOT NULL,
  `exam` varchar(100) NOT NULL,
  `section` varchar(100) NOT NULL,
  `subject` varchar(100) NOT NULL,
  `first_ca` int(11) NOT NULL,
  `second_ca` int(11) NOT NULL,
  `exam_score` int(11) NOT NULL,
  `school_year` varchar(100) NOT NULL,
  `current_school_session` varchar(70) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `results`
--

INSERT INTO `results` (`id`, `name_of_student`, `class`, `exam`, `section`, `subject`, `first_ca`, `second_ca`, `exam_score`, `school_year`, `current_school_session`) VALUES
(5, 'Amaka Israel', 'Year 7', '2nd Term', 'Lily', 'Computer Studies', 20, 20, 60, '2022', '2022/2023'),
(6, 'Andrew Stephen', 'Year 7', '2nd Term', 'Lily', 'Computer Studies', 20, 20, 50, '2022', '2022/2023'),
(7, 'Blessing Okoro', 'Year 7', '2nd Term', 'Lily', 'Computer Studies', 12, 20, 46, '2022', '2022/2023'),
(8, 'Obagho David', 'Year 7', '2nd Term', 'Lily', 'Computer Studies', 20, 20, 60, '2022', '2022/2023'),
(9, 'Amaka Israel', 'Year 7', '2nd Term', 'Lily', 'English Studies', 20, 20, 60, '2022', '2022/2023'),
(10, 'Andrew Stephen', 'Year 7', '2nd Term', 'Lily', 'English Studies', 12, 16, 50, '2022', '2022/2023'),
(11, 'Blessing Okoro', 'Year 7', '2nd Term', 'Lily', 'English Studies', 10, 10, 43, '2022', '2022/2023'),
(12, 'Obagho David', 'Year 7', '2nd Term', 'Lily', 'English Studies', 15, 18, 60, '2022', '2022/2023'),
(13, 'Amaka Israel', 'Year 7', '2nd Term', 'Lily', 'Health Education', 12, 12, 40, '2022', '2022/2023'),
(14, 'Andrew Stephen', 'Year 7', '2nd Term', 'Lily', 'Health Education', 16, 18, 60, '2022', '2022/2023'),
(15, 'Blessing Okoro', 'Year 7', '2nd Term', 'Lily', 'Health Education', 20, 16, 45, '2022', '2022/2023'),
(16, 'Obagho David', 'Year 7', '2nd Term', 'Lily', 'Health Education', 20, 20, 56, '2022', '2022/2023'),
(17, 'Amaka Israel', 'Year 7', '2nd Term', 'Lily', 'Home Economics', 14, 16, 30, '2022', '2022/2023'),
(18, 'Andrew Stephen', 'Year 7', '2nd Term', 'Lily', 'Home Economics', 12, 12, 54, '2022', '2022/2023'),
(19, 'Blessing Okoro', 'Year 7', '2nd Term', 'Lily', 'Home Economics', 20, 14, 54, '2022', '2022/2023'),
(20, 'Obagho David', 'Year 7', '2nd Term', 'Lily', 'Home Economics', 18, 18, 56, '2022', '2022/2023'),
(21, 'Amaka Israel', 'Year 7', '2nd Term', 'Lily', 'Mathematics', 14, 13, 45, '2022', '2022/2023'),
(22, 'Andrew Stephen', 'Year 7', '2nd Term', 'Lily', 'Mathematics', 16, 17, 58, '2022', '2022/2023'),
(23, 'Blessing Okoro', 'Year 7', '2nd Term', 'Lily', 'Mathematics', 10, 10, 34, '2022', '2022/2023'),
(24, 'Obagho David', 'Year 7', '2nd Term', 'Lily', 'Mathematics', 16, 18, 54, '2022', '2022/2023'),
(25, 'Blessing Praise', 'Year 7', '2nd Term', 'Lily', 'Computer Studies', 12, 20, 46, '2022', '2022/2023'),
(26, 'Amaka Israel', 'Year 7', '1st Term', 'Lily', 'Computer Studies', 13, 16, 56, '2022', '2022/2023'),
(27, 'Andrew Stephen', 'Year 7', '1st Term', 'Lily', 'Computer Studies', 10, 10, 50, '2022', '2022/2023'),
(28, 'Blessing Okoro', 'Year 7', '1st Term', 'Lily', 'Computer Studies', 20, 10, 56, '2022', '2022/2023'),
(29, 'Blessing Praise', 'Year 7', '1st Term', 'Lily', 'Computer Studies', 10, 10, 43, '2022', '2022/2023'),
(30, 'Obagho David', 'Year 7', '1st Term', 'Lily', 'Computer Studies', 17, 18, 58, '2022', '2022/2023'),
(31, 'Amalu Ifeanyi', 'Year 7', '1st Term', 'Lily', 'Health Education', 18, 20, 56, '2022', '2022/2023'),
(32, 'Gloria Smith', 'Year 7', '1st Term', 'Lily', 'Health Education', 16, 18, 54, '2022', '2022/2023'),
(33, 'Grace Kalu', 'Year 7', '1st Term', 'Lily', 'Health Education', 20, 17, 50, '2022', '2022/2023'),
(34, 'Amaka Israel', 'Year 8', '1st Term', 'Lily', 'Computer Studies', 10, 20, 54, '2022', '2022/2023'),
(35, 'Amalu Ifeanyi', 'Year 8', '1st Term', 'Lily', 'Computer Studies', 10, 17, 54, '2022', '2022/2023'),
(36, 'Andrew Stephen', 'Year 8', '1st Term', 'Lily', 'Computer Studies', 17, 18, 45, '2022', '2022/2023'),
(37, 'Blessing Okoro', 'Year 8', '1st Term', 'Lily', 'Computer Studies', 16, 15, 43, '2022', '2022/2023'),
(38, 'Blessing Praise', 'Year 8', '1st Term', 'Lily', 'Computer Studies', 19, 20, 40, '2022', '2022/2023'),
(39, 'Gloria Smith', 'Year 8', '1st Term', 'Lily', 'Computer Studies', 13, 17, 35, '2022', '2022/2023'),
(40, 'Grace Kalu', 'Year 8', '1st Term', 'Lily', 'Computer Studies', 18, 16, 46, '2022', '2022/2023'),
(41, 'Obagho David', 'Year 8', '1st Term', 'Lily', 'Computer Studies', 18, 18, 45, '2022', '2022/2023'),
(42, 'Amaka Israel', 'Year 8', '1st Term', 'Lily', 'English', 10, 10, 54, '2022', '2022/2023'),
(43, 'Amalu Ifeanyi', 'Year 8', '1st Term', 'Lily', 'English', 10, 20, 30, '2022', '2022/2023'),
(44, 'Andrew Stephen', 'Year 8', '1st Term', 'Lily', 'English', 0, 0, 0, '2022', '2022/2023'),
(45, 'Blessing Okoro', 'Year 8', '1st Term', 'Lily', 'English', 0, 0, 0, '2022', '2022/2023'),
(46, 'Blessing Praise', 'Year 8', '1st Term', 'Lily', 'English', 0, 0, 0, '2022', '2022/2023'),
(47, 'Gloria Smith', 'Year 8', '1st Term', 'Lily', 'English', 0, 0, 0, '2022', '2022/2023'),
(48, 'Obagho David', 'Year 8', '1st Term', 'Lily', 'English', 10, 16, 53, '2022', '2022/2023'),
(49, 'Elizabeth Albert', 'Year 10', '1st Term', 'Lily', 'Mathematics', 17, 18, 40, '2022', '2022/2023'),
(50, 'Amaka Israel', 'Year 8', '1st Term', 'Lily', 'French Studies', 10, 10, 54, '2022', '2022/2023'),
(51, 'Amalu Ifeanyi', 'Year 8', '1st Term', 'Lily', 'French Studies', 0, 0, 0, '2022', '2022/2023'),
(52, 'Andrew Stephen', 'Year 8', '1st Term', 'Lily', 'French Studies', 0, 0, 0, '2022', '2022/2023'),
(53, 'Blessing Okoro', 'Year 8', '1st Term', 'Lily', 'French Studies', 0, 0, 0, '2022', '2022/2023'),
(54, 'Blessing Praise', 'Year 8', '1st Term', 'Lily', 'French Studies', 0, 0, 0, '2022', '2022/2023'),
(55, 'Gloria Smith', 'Year 8', '1st Term', 'Lily', 'French Studies', 0, 0, 0, '2022', '2022/2023'),
(56, 'Obagho David', 'Year 8', '1st Term', 'Lily', 'French Studies', 19, 19, 56, '2022', '2022/2023'),
(57, 'Amaka Israel', 'Year 8', '1st Term', 'Lily', 'Home Economics', 10, 19, 45, '2022', '2022/2023'),
(58, 'Amalu Ifeanyi', 'Year 8', '1st Term', 'Lily', 'Home Economics', 18, 18, 45, '2022', '2022/2023'),
(59, 'Andrew Stephen', 'Year 8', '1st Term', 'Lily', 'Home Economics', 0, 0, 0, '2022', '2022/2023'),
(60, 'Blessing Okoro', 'Year 8', '1st Term', 'Lily', 'Home Economics', 0, 0, 0, '2022', '2022/2023'),
(61, 'Blessing Praise', 'Year 8', '1st Term', 'Lily', 'Home Economics', 0, 0, 0, '2022', '2022/2023'),
(62, 'Gloria Smith', 'Year 8', '1st Term', 'Lily', 'Home Economics', 0, 0, 0, '2022', '2022/2023'),
(63, 'Obagho David', 'Year 8', '1st Term', 'Lily', 'Home Economics', 18, 18, 50, '2022', '2022/2023'),
(64, 'Amaka Israel', 'Year 8', '1st Term', 'Lily', 'Introductory Technology', 16, 16, 46, '2022', '2022/2023'),
(65, 'Amalu Ifeanyi', 'Year 8', '1st Term', 'Lily', 'Introductory Technology', 10, 15, 56, '2022', '2022/2023'),
(66, 'Andrew Stephen', 'Year 8', '1st Term', 'Lily', 'Introductory Technology', 0, 0, 0, '2022', '2022/2023'),
(67, 'Blessing Okoro', 'Year 8', '1st Term', 'Lily', 'Introductory Technology', 0, 0, 0, '2022', '2022/2023'),
(68, 'Blessing Praise', 'Year 8', '1st Term', 'Lily', 'Introductory Technology', 0, 0, 0, '2022', '2022/2023'),
(69, 'Gloria Smith', 'Year 8', '1st Term', 'Lily', 'Introductory Technology', 0, 0, 0, '2022', '2022/2023'),
(70, 'Obagho David', 'Year 8', '1st Term', 'Lily', 'Introductory Technology', 18, 18, 54, '2022', '2022/2023'),
(71, 'Amaka Israel', 'Year 8', '1st Term', 'Lily', 'Mathematics', 10, 10, 44, '2022', '2022/2023'),
(72, 'Amalu Ifeanyi', 'Year 8', '1st Term', 'Lily', 'Mathematics', 0, 0, 0, '2022', '2022/2023'),
(73, 'Andrew Stephen', 'Year 8', '1st Term', 'Lily', 'Mathematics', 0, 0, 0, '2022', '2022/2023'),
(74, 'Blessing Okoro', 'Year 8', '1st Term', 'Lily', 'Mathematics', 0, 0, 0, '2022', '2022/2023'),
(75, 'Blessing Praise', 'Year 8', '1st Term', 'Lily', 'Mathematics', 0, 0, 0, '2022', '2022/2023'),
(76, 'Gloria Smith', 'Year 8', '1st Term', 'Lily', 'Mathematics', 0, 0, 0, '2022', '2022/2023'),
(77, 'Obagho David', 'Year 8', '1st Term', 'Lily', 'Mathematics', 20, 20, 52, '2022', '2022/2023'),
(78, 'Amaka Israel', 'Year 8', '1st Term', 'Lily', 'Social Studies', 10, 10, 20, '2022', '2022/2023'),
(79, 'Amalu Ifeanyi', 'Year 8', '1st Term', 'Lily', 'Social Studies', 10, 10, 45, '2022', '2022/2023'),
(80, 'Andrew Stephen', 'Year 8', '1st Term', 'Lily', 'Social Studies', 0, 0, 0, '2022', '2022/2023'),
(81, 'Blessing Okoro', 'Year 8', '1st Term', 'Lily', 'Social Studies', 0, 0, 0, '2022', '2022/2023'),
(82, 'Blessing Praise', 'Year 8', '1st Term', 'Lily', 'Social Studies', 0, 0, 0, '2022', '2022/2023'),
(83, 'Gloria Smith', 'Year 8', '1st Term', 'Lily', 'Social Studies', 0, 0, 0, '2022', '2022/2023'),
(84, 'Obagho David', 'Year 8', '1st Term', 'Lily', 'Social Studies', 20, 16, 44, '2022', '2022/2023'),
(85, 'Amaka Israel', 'Year 8', '1st Term', 'Lily', 'Unique English', 10, 10, 54, '2022', '2022/2023'),
(86, 'Amalu Ifeanyi', 'Year 8', '1st Term', 'Lily', 'Unique English', 10, 10, 10, '2022', '2022/2023'),
(87, 'Andrew Stephen', 'Year 8', '1st Term', 'Lily', 'Unique English', 0, 0, 0, '2022', '2022/2023'),
(88, 'Blessing Okoro', 'Year 8', '1st Term', 'Lily', 'Unique English', 0, 0, 0, '2022', '2022/2023'),
(89, 'Blessing Praise', 'Year 8', '1st Term', 'Lily', 'Unique English', 0, 0, 0, '2022', '2022/2023'),
(90, 'Gloria Smith', 'Year 8', '1st Term', 'Lily', 'Unique English', 0, 0, 0, '2022', '2022/2023'),
(91, 'Obagho David', 'Year 8', '1st Term', 'Lily', 'Unique English', 20, 18, 55, '2022', '2022/2023'),
(92, 'Ambrose Hamid', 'Year 10', '1st Term', 'Ixora', 'Mathematics', 10, 10, 30, '2022', '2022/2023'),
(93, 'Samuel Obed', 'SS3', '2nd Term', 'Lily', 'English Studies', 19, 17, 50, '2023', '2022/2023'),
(94, 'Samuel Obed', 'SS3', '2nd Term', 'Lily', 'Mathematics', 18, 18, 40, '2023', '2022/2023'),
(95, 'Samuel Obed', 'SS3', '2nd Term', 'Lily', 'Social Studies', 18, 16, 60, '2023', '2022/2023');

-- --------------------------------------------------------

--
-- Table structure for table `sections`
--

CREATE TABLE `sections` (
  `id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `category` varchar(100) NOT NULL,
  `capacity` varchar(50) NOT NULL,
  `class` varchar(40) NOT NULL,
  `teacher_name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sections`
--

INSERT INTO `sections` (`id`, `name`, `category`, `capacity`, `class`, `teacher_name`) VALUES
(3, 'Lily', 'Junior Secondary School', '69', '3', 'Okeme David'),
(4, 'Ixora', 'Junior Secondary School', '80', '1', 'teacher 4'),
(5, 'Lily', 'Junior Secondary School', '41', '1', 'teacher 5'),
(6, 'Ixora', 'Junior Secondary School', '91', '3', 'Okeme David'),
(7, 'Lily', 'Junior Secondary School', '100', '4', 'Okeme David'),
(8, 'Ixora', 'Junior Secondary School', '100', '4', 'Okeme David'),
(9, 'Lily', 'Senior Secondary', '89', '5', 'Okeme David'),
(10, 'Ixora', 'Senior Secondary', '90', '5', 'teacher 3'),
(11, 'Lily', 'Senior Secondary', '100', '6', 'Okeme David'),
(12, 'Ixora', 'Senior Secondary', '80', '6', 'Okeme David'),
(13, 'Lily', 'Senior Secondary', '80', '7', 'Amaka Gibson'),
(14, 'Ixora', 'Senior Secondary', '70', '7', 'Amaka Gibson');

-- --------------------------------------------------------

--
-- Table structure for table `student_class_positions`
--

CREATE TABLE `student_class_positions` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `reg_no` varchar(150) NOT NULL,
  `class` varchar(60) NOT NULL,
  `section` varchar(60) NOT NULL,
  `exam` varchar(50) NOT NULL,
  `exam_year` varchar(100) NOT NULL,
  `marks_obtained` int(11) NOT NULL,
  `position` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `student_class_positions`
--

INSERT INTO `student_class_positions` (`id`, `name`, `reg_no`, `class`, `section`, `exam`, `exam_year`, `marks_obtained`, `position`) VALUES
(1, 'Amaka Israel', 'PCIS/2022_8539', 'Year 7', 'Lily', '2nd Term', '2022', 396, '3rd'),
(2, 'Andrew Stephen', 'PCIS/2022_9447', 'Year 7', 'Lily', '2nd Term', '2022', 431, '2nd'),
(3, 'Blessing Okoro', 'PCIS/2022_1924', 'Year 7', 'Lily', '2nd Term', '2022', 364, '4th'),
(4, 'Obagho David', 'PCIS/2021_6530', 'Year 7', 'Lily', '2nd Term', '2022', 469, '1st'),
(5, 'Blessing Praise', 'PCIS/2022_10050', 'Year 7', 'Lily', '2nd Term', '2022', 78, '5th'),
(6, 'Amaka Israel', 'PCIS/2022_8539', 'Year 7', 'Lily', '1st Term', '2022', 85, '6th'),
(7, 'Andrew Stephen', 'PCIS/2022_9447', 'Year 7', 'Lily', '1st Term', '2022', 70, '7th'),
(8, 'Blessing Okoro', 'PCIS/2022_1924', 'Year 7', 'Lily', '1st Term', '2022', 86, '5th'),
(9, 'Blessing Praise', 'PCIS/2022_10050', 'Year 7', 'Lily', '1st Term', '2022', 63, '8th'),
(10, 'Obagho David', 'PCIS/2021_6530', 'Year 7', 'Lily', '1st Term', '2022', 93, '2nd'),
(11, 'Amalu Ifeanyi', 'PCIS/2022_5242', 'Year 7', 'Lily', '1st Term', '2022', 94, '1st'),
(12, 'Gloria Smith', 'PCIS/2022_8943', 'Year 7', 'Lily', '1st Term', '2022', 88, '3rd'),
(13, 'Grace Kalu', 'PCIS/2022_9002', 'Year 7', 'Lily', '1st Term', '2022', 87, '4th'),
(14, 'Amaka Israel', 'PCIS/2022_8539', 'Year 8', 'Lily', '1st Term', '2022', 562, '2nd'),
(15, 'Amalu Ifeanyi', 'PCIS/2022_5242', 'Year 8', 'Lily', '1st Term', '2022', 398, '3rd'),
(16, 'Andrew Stephen', 'PCIS/2022_9447', 'Year 8', 'Lily', '1st Term', '2022', 80, '4th'),
(17, 'Blessing Okoro', 'PCIS/2022_1924', 'Year 8', 'Lily', '1st Term', '2022', 74, '6th'),
(18, 'Blessing Praise', 'PCIS/2022_10050', 'Year 8', 'Lily', '1st Term', '2022', 79, '5th'),
(19, 'Gloria Smith', 'PCIS/2022_8943', 'Year 8', 'Lily', '1st Term', '2022', 65, '7th'),
(20, 'Grace Kalu', 'PCIS/2022_9002', 'Year 8', 'Lily', '1st Term', '2022', 80, '4th'),
(21, 'Obagho David', 'PCIS/2021_6530', 'Year 8', 'Lily', '1st Term', '2022', 695, '1st'),
(22, 'Elizabeth Albert', 'PCIS/2022_5403', 'Year 10', 'Lily', '1st Term', '2022', 75, '1st'),
(23, 'Ambrose Hamid', 'PCIS/2021_2838', 'Year 10', 'Ixora', '1st Term', '2022', 50, ''),
(24, 'Samuel Obed', 'PCIS/2023_113', 'SS3', 'Lily', '2nd Term', '2023', 256, '1st');

-- --------------------------------------------------------

--
-- Table structure for table `subjects`
--

CREATE TABLE `subjects` (
  `id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `teacher_name` varchar(100) NOT NULL,
  `pass_mark` varchar(20) NOT NULL,
  `final_mark` varchar(20) NOT NULL,
  `subject_name` varchar(100) NOT NULL,
  `subject_author` varchar(100) NOT NULL,
  `subject_code` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `subjects`
--

INSERT INTO `subjects` (`id`, `class_id`, `teacher_name`, `pass_mark`, `final_mark`, `subject_name`, `subject_author`, `subject_code`) VALUES
(1, 1, 'Amaka Vivian', '50', '100', 'Mathematics', 'Mr. Barry', 'math001'),
(3, 1, 'Amaka Vivian', '10', '100', 'English Studies', '', 'Eng_001'),
(4, 4, 'Amaka Vivian', '50', '100', 'Mathematics', '', 'math002'),
(5, 3, 'Okeme David', '20', '100', 'Mathematics', '', 'math003'),
(6, 3, 'Okeme David', '20', '100', 'English Studies', '', 'Eng_003'),
(7, 3, 'Okeme David', '10', '100', 'Home Economics', '', 'econs001'),
(8, 3, 'Okeme David', '20', '100', 'Computer Studies', '', 'Comp001'),
(9, 3, 'Okeme David', '20', '100', 'Health Education', '', 'health_021'),
(10, 6, 'Okeme David', '40', '100', 'Mathematics', '', 'mathoo1'),
(11, 5, 'Okeme David', '10', '60', 'Mathematics', '', 'math006'),
(12, 7, 'Amaka Gibson', '10', '60', 'Mathematics', '', 'math008'),
(13, 4, 'teacher 4', '10', '78', 'English', '', 'eng_005'),
(14, 4, 'teacher 4', '1', '89', 'Home Economics', '', 'econs_009'),
(15, 4, 'teacher 4', '10', '100', 'Computer Studies', '', 'comp_005'),
(16, 4, 'Okeme David', '100', '10', 'Social Studies', '', 'sos001'),
(17, 4, 'Okeme David', '100', '10', 'Introductory Technology', '', 'intro001'),
(18, 4, 'Okeme David', '100', '10', 'French Studies', '', 'fren_001'),
(19, 4, 'Okeme David', '100', '10', 'Unique English', '', 'uni_001'),
(20, 7, 'Okeme David', '89', '100', 'English Studies', '', 'Eng001'),
(21, 7, 'Okeme David', '30', '40', 'Social Studies', '', 'sos002');

--
-- Indexes for table `attendance`
--
ALTER TABLE `attendance`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `card_expire_date`
--
ALTER TABLE `card_expire_date`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `card_usage_limit`
--
ALTER TABLE `card_usage_limit`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `classes`
--
ALTER TABLE `classes`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `exams`
--
ALTER TABLE `exams`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `general_settings`
--
ALTER TABLE `general_settings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `grade`
--
ALTER TABLE `grade`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `pins`
--
ALTER TABLE `pins`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `results`
--
ALTER TABLE `results`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sections`
--
ALTER TABLE `sections`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `student_class_positions`
--
ALTER TABLE `student_class_positions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `subjects`
--
ALTER TABLE `subjects`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for table `attendance`
--
ALTER TABLE `attendance`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `card_expire_date`
--
ALTER TABLE `card_expire_date`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `card_usage_limit`
--
ALTER TABLE `card_usage_limit`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `classes`
--
ALTER TABLE `classes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=19;

--
-- AUTO_INCREMENT for table `exams`
--
ALTER TABLE `exams`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `general_settings`
--
ALTER TABLE `general_settings`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `grade`
--
ALTER TABLE `grade`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `pins`
--
ALTER TABLE `pins`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `results`
--
ALTER TABLE `results`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=96;

--
-- AUTO_INCREMENT for table `sections`
--
ALTER TABLE `sections`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `student_class_positions`
--
ALTER TABLE `student_class_positions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

--
-- AUTO_INCREMENT for table `subjects`
--
ALTER TABLE `subjects`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
COMMIT;

