<?php

/**
 * Class that operate on table 'employeeattendancesystem'. Database Mysql.
 *
 * @author: http://phpdao.com
 * @date: 2020-11-11 23:00
 */
class EmployeeattendancesystemMySqlExtDAO extends EmployeeattendancesystemMySqlDAO
{

	public function getAttendanceSystemByEmployeeSubGroup($employeesubgroupid)
	{
		$sql = 'SELECT employeeattendancesystem.*
                        FROM employeeattendancesystem
                        join employeesubgroup on employeesubgroup.employeeattendancesystemid = employeeattendancesystem.id
                        where employeesubgroup.id= ' . $employeesubgroupid;
		$sqlQuery = new SqlQuery($sql);
		return $this->getRow($sqlQuery);
	}

	public function getAttendanceSystemByEmployeeGroup($employeegroupid)
	{
		$sql = 'SELECT employeeattendancesystem.*
                        FROM employeeattendancesystem
                        join employeegroup on employeegroup.employeeattendancesystemid = employeeattendancesystem.id
                        where employeegroup.id= ' . $employeegroupid;
		$sqlQuery = new SqlQuery($sql);
		return $this->getRow($sqlQuery);
	}
}
