+
+ // insertMonthlyQuota - a helper function to insert a monthly quota.
+ private function insertMonthlyQuota($team_id, $year, $month, $quota) {
+ $mdb2 = getConnection();
+ $sql = "INSERT INTO tt_monthly_quotas (team_id, year, month, quota) values ($team_id, $year, $month, $quota)";
+ $affected = $mdb2->exec($sql);
+ return (!is_a($affected, 'PEAR_Error'));
+ }