public static function getArticle($id) { $db = new DB(); return $db->select_one('news', $id, 'News'); }
/** * get the geocode lat/lon points from cache for given address * * @param string $address */ public function getCache($address) { $_ret = array(); $_sql = "SELECT lon,lat FROM " . $this->_db_cache_table . " WHERE address = \"@address\""; $_res = DB::select_one(DBHelper::prepare($_sql, array('address' => $address))); if ($_res) { $_ret['lon'] = $_res[0]; $_ret['lat'] = $_res[1]; } return !empty($_ret) ? $_ret : false; }