_table; $query = Doo::db ()->query ( $sql ); $result = $query->fetchAll (); return $result; } /** * 根据id获取文章 * @param unknown_type $aid */ function get_article_by_aid ( $aid ){ $sql = "select displayorder,aid, title, content, time, cid from " . $this->_table . " where aid=" . $aid; $query = Doo::db ()->query ( $sql ); $result = $query->fetch (); return $result; } /** * 根据分类获取文章 * @param unknown_type $cid */ function get_article_by_cid($cid = 0) { $sql = "select displayorder,aid, title, content, cid from " . $this->_table . " where cid=" . $cid; $query = Doo::db ()->query ( $sql ); $result = $query->fetchAll (); return $result; } } ?>