Download Code PHP and Gmail SMTP-Based Employee Payslip Generator with Email Sending Feature
Updated Employee Payslip Generator with Gmail SMTP Email Sending Feature
This guide provides updated instructions on how to use Gmail SMTP for sending generated payslips via email, with an attachment, using the Employee Payslip Generator System. The process includes setting up your Gmail account with XAMPP’s sendmail package. As Google has removed the “Less Secure Apps” option, we will use the Google App Password feature for secure sign-in or authentication.
What is the Employee Payslip Generator System?
The Employee Payslip Generator System is a PHP-based project designed for businesses to manage employee payroll and generate PDF payslips. The system allows the management to easily calculate the employees’ salaries and send the generated payslips to their email addresses. The payslips are encrypted, and the password to open them is shared only with the respective employee.
For more details, you can explore the system, which is available for free download.
Setting Up the PHP Mailing Function
Once your Gmail account is ready, you need to configure the PHP mailing function. Ensure that the SMTP settings match the values in your php.ini file, which is located in the php
directory of your XAMPP installation.
Configuring the sendmail.ini File
Next, configure the sendmail.ini
file to connect with Gmail’s SMTP server. The file is located in the sendmail
directory of your XAMPP setup.
Conclusion
Once you’ve set up the configuration files, your Employee Payslip Generator system should be able to send payslips as email attachments using Gmail SMTP. If you haven’t already downloaded the Employee Payslip Generator System, the source code is provided for free, and you can download it from the link below.
This guide should help you implement the Gmail SMTP functionality into your payslip generator system and improve your current and future PHP projects.
index PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
<?php require_once('../config.php'); ?> <!DOCTYPE html> <html lang="en" class="" style="height: auto;"> <?php require_once('inc/header.php') ?> <body class="sidebar-mini layout-fixed control-sidebar-slide-open layout-navbar-fixed sidebar-mini-md sidebar-mini-xs" data-new-gr-c-s-check-loaded="14.991.0" data-gr-ext-installed="" style="height: auto;"> <div class="wrapper"> <?php require_once('inc/topBarNav.php') ?> <?php require_once('inc/navigation.php') ?> <?php $page = isset($_GET['page']) ? $_GET['page'] : 'home'; ?> <?php if($_settings->chk_flashdata('success')): ?> <script> alert_toast("<?php echo $_settings->flashdata('success') ?>",'success') </script> <?php endif;?> <!-- Content Wrapper. Contains page content --> <div class="content-wrapper pt-3" style="min-height: 567.854px;"> <!-- Main content --> <section class="content"> <div class="container-fluid"> <?php if(!file_exists($page.".php") && !is_dir($page)){ include '404.html'; }else{ if(is_dir($page)) include $page.'/index.php'; else include $page.'.php'; } ?> </div> </section> <!-- /.content --> <div class="modal fade" id="uni_modal" role='dialog'> <div class="modal-dialog modal-md modal-dialog-centered" role="document"> <div class="modal-content rounded-0"> <div class="modal-header"> <h5 class="modal-title"></h5> </div> <div class="modal-body"> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary btn-sm rounded-0" id='submit' onclick="$('#uni_modal form').submit()">Save</button> <button type="button" class="btn btn-secondary btn-sm rounded-0" data-dismiss="modal">Cancel</button> </div> </div> </div> </div> <div class="modal fade" id="uni_modal_right" role='dialog'> <div class="modal-dialog modal-full-height modal-md" role="document"> <div class="modal-content rounded-0"> <div class="modal-header"> <h5 class="modal-title"></h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span class="fa fa-arrow-right"></span> </button> </div> <div class="modal-body"> </div> </div> </div> </div> <div class="modal fade" id="viewer_modal" role='dialog'> <div class="modal-dialog modal-md" role="document"> <div class="modal-content rounded-0"> <button type="button" class="btn-close" data-dismiss="modal"><span class="fa fa-times"></span></button> <img src="" alt=""> </div> </div> </div> <div class="modal fade" id="confirm_modal" role='dialog'> <div class="modal-dialog modal-md modal-dialog-centered" role="document"> <div class="modal-content rounded-0"> <div class="modal-header"> <h5 class="modal-title">Confirmation</h5> </div> <div class="modal-body"> <div id="delete_content"></div> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary btn-sm rounded-0" id='confirm' onclick="">Continue</button> <button type="button" class="btn btn-secondary btn-sm rounded-0" data-dismiss="modal">Close</button> </div> </div> </div> </div> </div> <!-- /.content-wrapper --> <?php require_once('inc/footer.php') ?> </body> </html> |
login PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
<?php require_once('../config.php') ?> <!DOCTYPE html> <html lang="en" class="" style="height: auto;"> <?php require_once('inc/header.php') ?> <body class="hold-transition login-page"> <script> start_loader() </script> <style> body{ width:calc(100%); height:calc(100%); background-image:url('<?= validate_image($_settings->info('cover')) ?>'); background-repeat: no-repeat; background-size:cover; } #logo-img{ width:15em; height:15em; object-fit:scale-down; object-position:center center; } </style> <div class="login-box"> <center><img src="<?= validate_image($_settings->info('logo')) ?>" alt="System Logo" class="img-thumbnail rounded-circle" id="logo-img"></center> <div class="clear-fix my-2"></div> <!-- /.login-logo --> <div class="card card-outline card-primary"> <div class="card-header text-center"> <a href="./" class="h1"><b>Admin Login</b></a> </div> <div class="card-body"> <p class="login-box-msg">Sign in to start your session</p> <form id="login-frm" action="" method="post"> <div class="input-group mb-3"> <input type="text" class="form-control" name="username" autofocus placeholder="Username"> <div class="input-group-append"> <div class="input-group-text"> <span class="fas fa-user"></span> </div> </div> </div> <div class="input-group mb-3"> <input type="password" class="form-control" name="password" placeholder="Password"> <div class="input-group-append"> <div class="input-group-text"> <span class="fas fa-lock"></span> </div> </div> </div> <div class="row"> <div class="col-8"> <a href="<?php echo base_url ?>">Back to Site</a> </div> <!-- /.col --> <div class="col-4"> <button type="submit" class="btn btn-primary btn-flat btn-sm w-100">Sign In</button> </div> <!-- /.col --> </div> </form> <!-- /.social-auth-links --> <!-- <p class="mb-1"> <a href="forgot-password.html">I forgot my password</a> </p> --> </div> <!-- /.card-body --> </div> <!-- /.card --> </div> <!-- /.login-box --> <!-- jQuery --> <script src="plugins/jquery/jquery.min.js"></script> <!-- Bootstrap 4 --> <script src="plugins/bootstrap/js/bootstrap.bundle.min.js"></script> <!-- AdminLTE App --> <script src="dist/js/adminlte.min.js"></script> <script> $(document).ready(function(){ end_loader(); }) </script> </body> </html> |
pess_db SQL
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 26, 2022 at 02:57 AM -- Server version: 10.4.19-MariaDB -- PHP Version: 8.0.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; -- -- Database: `pess_db` -- -- -------------------------------------------------------- -- -- Table structure for table `allowance_list` -- CREATE TABLE `allowance_list` ( `payslip_id` int(30) NOT NULL, `name` text NOT NULL, `amount` float NOT NULL DEFAULT 0 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `allowance_list` -- INSERT INTO `allowance_list` (`payslip_id`, `name`, `amount`) VALUES (2, 'Gas Allowance', 1500), (2, 'Rice', 500), (2, 'Overtime', 540), (3, 'Allowance 101', 1000), (3, 'Allowance 102', 1500), (3, 'Allowance 101', 2000); -- -------------------------------------------------------- -- -- Table structure for table `deduction_list` -- CREATE TABLE `deduction_list` ( `payslip_id` int(30) NOT NULL, `name` text NOT NULL, `amount` float NOT NULL DEFAULT 0 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `deduction_list` -- INSERT INTO `deduction_list` (`payslip_id`, `name`, `amount`) VALUES (2, 'PAGIBIG', 100), (2, 'SSS', 300), (3, 'Deduction 101', 1000), (3, 'Deduction 102', 300), (3, 'Deduction 103', 350); -- -------------------------------------------------------- -- -- Table structure for table `department_list` -- CREATE TABLE `department_list` ( `id` int(30) NOT NULL, `name` text NOT NULL, `description` text NOT NULL, `status` tinyint(1) NOT NULL DEFAULT 1, `delete_flag` tinyint(1) NOT NULL DEFAULT 0, `date_created` datetime NOT NULL DEFAULT current_timestamp(), `date_updated` datetime DEFAULT NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `department_list` -- INSERT INTO `department_list` (`id`, `name`, `description`, `status`, `delete_flag`, `date_created`, `date_updated`) VALUES (1, 'IT Department', 'Information Technology Department', 1, 0, '2022-03-25 10:19:48', '2022-03-25 10:20:26'), (2, 'HR Department', 'Human Resource Department', 1, 0, '2022-03-25 10:22:58', NULL), (3, 'Marketing Department', 'Marketing Department', 1, 0, '2022-03-25 10:23:07', NULL), (4, 'Accounting and Finance', 'Accounting and Finance Department', 1, 0, '2022-03-25 10:23:32', NULL), (5, 'test', 'test', 1, 1, '2022-03-25 10:23:42', '2022-03-25 10:23:45'); -- -------------------------------------------------------- -- -- Table structure for table `employee_list` -- CREATE TABLE `employee_list` ( `id` int(30) NOT NULL, `company_id` varchar(100) NOT NULL, `department_id` int(30) NOT NULL, `position_id` int(30) NOT NULL, `first_name` varchar(250) NOT NULL, `middle_name` varchar(250) DEFAULT NULL, `last_name` varchar(250) NOT NULL, `gender` varchar(100) NOT NULL, `email` text NOT NULL, `status` tinyint(1) NOT NULL DEFAULT 1, `delete_flag` tinyint(1) NOT NULL DEFAULT 0, `date_created` datetime NOT NULL DEFAULT current_timestamp(), `date_updated` datetime DEFAULT NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `employee_list` -- INSERT INTO `employee_list` (`id`, `company_id`, `department_id`, `position_id`, `first_name`, `middle_name`, `last_name`, `gender`, `email`, `status`, `delete_flag`, `date_created`, `date_updated`) VALUES (1, '6231415', 1, 7, 'John', 'D', 'Smith', 'Male', 'jsmith231415@gmail.com', 1, 0, '2022-03-25 11:16:26', NULL), (2, '10140715', 2, 1, 'Claire', 'C', 'Blake', 'Female', 'cblake6231415@gmail.com', 1, 0, '2022-03-25 11:24:05', NULL), (3, '12345', 3, 3, 'Mark', 'T', 'Cooper', 'Male', 'mcooper@gmail.com', 0, 0, '2022-03-25 11:27:29', NULL), (4, 'test', 2, 3, 'test', 'test', 'test', 'Male', 'test@tset', 0, 1, '2022-03-25 11:27:57', '2022-03-25 11:28:03'); -- -------------------------------------------------------- -- -- Table structure for table `payroll_list` -- CREATE TABLE `payroll_list` ( `id` int(30) NOT NULL, `code` varchar(100) NOT NULL, `start_date` date NOT NULL, `end_date` date NOT NULL, `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '1 = Monthly, 2= Semi-Monthly, 3= Daily', `status` tinyint(1) NOT NULL DEFAULT 1, `delete_flag` tinyint(1) NOT NULL DEFAULT 0, `date_created` datetime NOT NULL DEFAULT current_timestamp(), `date_updated` datetime DEFAULT NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `payroll_list` -- INSERT INTO `payroll_list` (`id`, `code`, `start_date`, `end_date`, `type`, `status`, `delete_flag`, `date_created`, `date_updated`) VALUES (1, '20220315', '2022-03-01', '2022-03-15', 2, 1, 0, '2022-03-25 12:05:44', '2022-03-25 12:57:47'); -- -------------------------------------------------------- -- -- Table structure for table `payslip_list` -- CREATE TABLE `payslip_list` ( `id` int(30) NOT NULL, `payroll_id` int(30) NOT NULL, `employee_id` int(30) NOT NULL, `days_present` float(10,1) NOT NULL, `days_absent` float(10,1) NOT NULL, `tardy_undertime` float(10,1) NOT NULL, `total_allowance` float NOT NULL DEFAULT 0, `total_deduction` float NOT NULL DEFAULT 0, `base_salary` float NOT NULL DEFAULT 0, `withholding_tax` float NOT NULL DEFAULT 0, `net` float NOT NULL DEFAULT 0, `file_path` text DEFAULT NULL, `date_created` datetime NOT NULL DEFAULT current_timestamp(), `date_updated` datetime DEFAULT NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `payslip_list` -- INSERT INTO `payslip_list` (`id`, `payroll_id`, `employee_id`, `days_present`, `days_absent`, `tardy_undertime`, `total_allowance`, `total_deduction`, `base_salary`, `withholding_tax`, `net`, `file_path`, `date_created`, `date_updated`) VALUES (2, 1, 1, 11.0, 0.0, 0.0, 2540, 400, 9000, 840, 10000, NULL, '2022-03-25 14:29:04', '2022-03-26 08:32:38'), (3, 1, 2, 10.0, 1.0, 30.0, 4500, 1650, 25000, 0, 25435.2, NULL, '2022-03-25 17:02:41', '2022-03-26 08:23:57'); -- -------------------------------------------------------- -- -- Table structure for table `position_list` -- CREATE TABLE `position_list` ( `id` int(30) NOT NULL, `name` text NOT NULL, `status` tinyint(1) NOT NULL DEFAULT 1, `delete_flag` tinyint(1) NOT NULL DEFAULT 0, `date_created` datetime NOT NULL DEFAULT current_timestamp(), `date_updated` datetime DEFAULT NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `position_list` -- INSERT INTO `position_list` (`id`, `name`, `status`, `delete_flag`, `date_created`, `date_updated`) VALUES (1, 'Department Head', 1, 0, '2022-03-25 10:31:52', NULL), (2, 'Office Clerk', 1, 0, '2022-03-25 10:32:01', NULL), (3, 'Staff', 1, 0, '2022-03-25 10:32:26', NULL), (4, 'Jr. Web Developer', 1, 0, '2022-03-25 10:34:04', NULL), (5, 'Sr. Web Developer', 1, 0, '2022-03-25 10:34:11', NULL), (6, 'PHP Developer', 1, 0, '2022-03-25 10:34:19', NULL), (7, 'Full Stack Dev', 1, 0, '2022-03-25 10:34:38', NULL), (8, 'test', 1, 0, '2022-03-25 10:35:16', NULL); -- -------------------------------------------------------- -- -- Table structure for table `system_info` -- CREATE TABLE `system_info` ( `id` int(30) NOT NULL, `meta_field` text NOT NULL, `meta_value` text NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `system_info` -- INSERT INTO `system_info` (`id`, `meta_field`, `meta_value`) VALUES (1, 'name', 'XYZ Company Inc.'), (6, 'short_name', 'Payslip - PHP'), (11, 'logo', 'uploads/system-logo.png?v=1648173882'), (13, 'user_avatar', 'uploads/user_avatar.jpg'), (14, 'cover', 'uploads/system-cover.png?v=1648173974'); -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` int(50) NOT NULL, `firstname` varchar(250) NOT NULL, `lastname` varchar(250) NOT NULL, `username` text NOT NULL, `password` text NOT NULL, `avatar` text DEFAULT NULL, `last_login` datetime DEFAULT NULL, `type` tinyint(1) NOT NULL DEFAULT 0, `date_added` datetime NOT NULL DEFAULT current_timestamp(), `date_updated` datetime DEFAULT NULL ON UPDATE current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; -- -- Dumping data for table `users` -- INSERT INTO `users` (`id`, `firstname`, `lastname`, `username`, `password`, `avatar`, `last_login`, `type`, `date_added`, `date_updated`) VALUES (1, 'Adminstrator', 'Admin', 'admin', '0192023a7bbd73250516f069df18b500', 'uploads/1624240500_avatar.png', NULL, 1, '2021-01-20 14:02:37', '2021-06-21 09:55:07'), (10, 'Claire', 'Blake', 'cblake', '542d2760db6928e65bd10de7c16bb82c', 'uploads/avatar-10.png?v=1648021481', NULL, 2, '2022-03-23 15:44:41', '2022-03-23 15:44:41'); -- -- Indexes for dumped tables -- -- -- Indexes for table `allowance_list` -- ALTER TABLE `allowance_list` ADD KEY `payslip_id` (`payslip_id`); -- -- Indexes for table `deduction_list` -- ALTER TABLE `deduction_list` ADD KEY `payslip_id` (`payslip_id`); -- -- Indexes for table `department_list` -- ALTER TABLE `department_list` ADD PRIMARY KEY (`id`); -- -- Indexes for table `employee_list` -- ALTER TABLE `employee_list` ADD PRIMARY KEY (`id`), ADD KEY `department_id` (`department_id`), ADD KEY `position_id` (`position_id`); -- -- Indexes for table `payroll_list` -- ALTER TABLE `payroll_list` ADD PRIMARY KEY (`id`); -- -- Indexes for table `payslip_list` -- ALTER TABLE `payslip_list` ADD PRIMARY KEY (`id`), ADD KEY `payroll_id` (`payroll_id`), ADD KEY `employee_id` (`employee_id`); -- -- Indexes for table `position_list` -- ALTER TABLE `position_list` ADD PRIMARY KEY (`id`); -- -- Indexes for table `system_info` -- ALTER TABLE `system_info` ADD PRIMARY KEY (`id`); -- -- Indexes for table `users` -- ALTER TABLE `users` ADD PRIMARY KEY (`id`); -- -- AUTO_INCREMENT for dumped tables -- -- -- AUTO_INCREMENT for table `department_list` -- ALTER TABLE `department_list` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6; -- -- AUTO_INCREMENT for table `employee_list` -- ALTER TABLE `employee_list` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5; -- -- AUTO_INCREMENT for table `payroll_list` -- ALTER TABLE `payroll_list` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2; -- -- AUTO_INCREMENT for table `payslip_list` -- ALTER TABLE `payslip_list` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4; -- -- AUTO_INCREMENT for table `position_list` -- ALTER TABLE `position_list` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9; -- -- AUTO_INCREMENT for table `system_info` -- ALTER TABLE `system_info` MODIFY `id` int(30) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15; -- -- AUTO_INCREMENT for table `users` -- ALTER TABLE `users` MODIFY `id` int(50) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11; -- -- Constraints for dumped tables -- -- -- Constraints for table `allowance_list` -- ALTER TABLE `allowance_list` ADD CONSTRAINT `allowance_fk_payslip_id` FOREIGN KEY (`payslip_id`) REFERENCES `payslip_list` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION; -- -- Constraints for table `deduction_list` -- ALTER TABLE `deduction_list` ADD CONSTRAINT `deduction_fk_payslip_id` FOREIGN KEY (`payslip_id`) REFERENCES `payslip_list` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION; -- -- Constraints for table `employee_list` -- ALTER TABLE `employee_list` ADD CONSTRAINT `employee_fk_department_id` FOREIGN KEY (`department_id`) REFERENCES `department_list` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION, ADD CONSTRAINT `employee_fk_position_id` FOREIGN KEY (`position_id`) REFERENCES `position_list` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION; -- -- Constraints for table `payslip_list` -- ALTER TABLE `payslip_list` ADD CONSTRAINT `payslip_fk_payroll_id` FOREIGN KEY (`payroll_id`) REFERENCES `payroll_list` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION; COMMIT; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |