<?php

class QuotaDao {
    public static function replace($year,$month,$consultantId,$quota){
        global $wpdb;
        $result = $wpdb->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;
    }
} 