public function fetch($arg = null, $p_forceExists = false)
{
global $g_ado_db;
if (is_array($arg)) {
return parent::fetch($arg, $p_forceExists);
}
if (!$this->keyValuesExist()) {
return false;
}
if ($this->readFromCache() !== false) {
return true;
}
$queryStr = 'SELECT *, X(poi_location) as latitude, Y(poi_location) as longitude
FROM ' . self::TABLE . '
WHERE id = ' . $this->getId();
$this->m_data = $g_ado_db->GetRow($queryStr);
$this->m_exists = count($this->m_data) > 0;
if ($this->m_exists) {
// Write the object to cache
$this->writeCache();
}
return $this->m_exists;
}