<?php
    class ChartModel extends Database {

		public function queryChart($departamento){
			$data = null;
			$sql = "SELECT * FROM empregado WHERE departamento = ?";
			if($stmt = $this->connect()->prepare($sql)){
				$stmt->execute([$departamento]);
				while($row = $stmt->fetch()){
				$data[] = $row;
				}
			}
			return $data;
		}

    }