public function discountcode_users($reload = false) { if ($reload or !$this->discountcode_users_cache) { $id = mysql_real_escape_string($this->id); $this->discountcode_users_cache = DiscountCodeUser::find_all("users.id = '{$id}'"); } return $this->discountcode_users_cache; }