<?php
final class PreRegisterDao extends Dao {
    public function __construct() {
    }
    public function selectUserNo($mailAddress) {
        $stmt = " select user_no";
        $stmt .= "  from ms_user";
        $stmt .= " where mail_address = ?";
        $res = $this->pdo->prepare($stmt);
        $res->execute(array($mailAddress));
        return $res->fetchColumn();
    }
    public function insertPreRegister($mailAddress, $uniqueId) {
        $stmt = " replace into tr_pre_register";
        $stmt .= " values (?, ?, now() + interval 30 minute)";
        $res = $this->pdo->prepare($stmt);
        $res->execute(array($mailAddress, $uniqueId));
    }
}
// EOF.