<?php

class QuotaDao {
    public static function replace($year,$month,$consultantId,$quota){
        global $wpdb;
        $result = DBManager::replace(Config::TOSPUR_QUOTA_TABLE,array(
            "year" => $year,
            "month" => $month,
            "consultantId" => $consultantId,
            "quota" => $quota
        ),array(
            "%d",
            "%d",
            "%d",
            "%d"
        ));
        if($wpdb->last_error)
            return $wpdb->last_error;
        return $result;
    }
} 