/** * Check existence of specified currency code in curr_code unique field. * * @return int ID if currency code exists otherwise NULL/false */ function dbexists() { return parent::dbexists('curr_code', $this->code); }
/** * Check existence of specified user field ID in ufdf_ID unique field. * * @todo dh> Two returns here!! * @return int ID if user field exists otherwise NULL/false */ function dbexists() { global $DB; $sql = "SELECT {$this->dbIDname}\n\t\t\t\t\t\t FROM {$this->dbtablename}\n\t\t\t\t\t WHERE {$this->dbIDname} = {$this->ID}"; return $DB->get_var($sql); return parent::dbexists('ufdf_ID', $this->ID); }
/** * Check existence of specified goal in goal_key unique field. * * @return int ID if goal exists otherwise NULL/false */ function dbexists() { return parent::dbexists('goal_key', $this->key); }
/** * Check existence of specified sub-region code in subrg_code unique field. * * @return int ID if region + sub-region code exist otherwise NULL/false */ function dbexists() { return parent::dbexists(array('subrg_rgn_ID', 'subrg_code'), array($this->rgn_ID, $this->code)); }
/** * Check existence of specified region code in rgn_code unique field. * * @return int ID if country + region code exist otherwise NULL/false */ function dbexists() { return parent::dbexists(array('rgn_ctry_ID', 'rgn_code'), array($this->ctry_ID, $this->code)); }