<?php
final class LoginDao extends Dao {
    public function __construct() {
    }
    public function selectUserNo($mailAddress, $password) {
        $stmt = " select user_no";
        $stmt .= "  from ms_user";
        $stmt .= " where mail_address = ?";
        $stmt .= "   and password = md5(?)";
        $res = $this->pdo->prepare($stmt);
        $res->execute(array($mailAddress, $password));
        return $res->fetchColumn();
    }
    public function updateUniqueId($uniqueId, $userNo) {
        $stmt = " update ms_user";
        $stmt .= "   set unique_id = ?";
        $stmt .= " where user_no = ?";
        $res = $this->pdo->prepare($stmt);
        $res->execute(array($uniqueId, $userNo));
    }
}
// EOF.