Пример #1
0
    public function getCandidatesForJob($jobId)
    {
        $req = $this->db->prepare('SELECT
candidates.*
FROM candidates
INNER JOIN appliedjobs ON appliedjobs.candidateId = candidates.Id
WHERE appliedjobs.jobId = :id');
        $req->execute(array('id' => $jobId));
        $res = $req->fetchALL();
        $candidates = Candidate::getModels($res);
        return $candidates;
    }