function add($compile = true) { if (!isset($this->url)) { return $this->_error('url'); } $this->host = null; if (!($query = $this->_buildQuery())) { return false; } if (!$query->hasAttribute('referred')) { $query->setAttribute('referred', 'UNIX_TIMESTAMP()'); } if (!$query->insert()) { return $this->_error('insert'); } if ($compile) { RefererStatistics::compile($this->host); } return true; }