Tadashi Okoshi
slash****@users*****
2005年 12月 10日 (土) 09:46:28 JST
Index: affelio/lib/Affelio/Managing/NewsAggregator.pm
diff -u affelio/lib/Affelio/Managing/NewsAggregator.pm:1.4 affelio/lib/Affelio/Managing/NewsAggregator.pm:1.5
--- affelio/lib/Affelio/Managing/NewsAggregator.pm:1.4 Sat Dec 10 08:56:09 2005
+++ affelio/lib/Affelio/Managing/NewsAggregator.pm Sat Dec 10 09:46:28 2005
@@ -14,7 +14,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
-# $Id: NewsAggregator.pm,v 1.4 2005/12/09 23:56:09 slash5234 Exp $
+# $Id: NewsAggregator.pm,v 1.5 2005/12/10 00:46:28 slash5234 Exp $
package Affelio::Managing::NewsAggregator;
{
@@ -73,6 +73,32 @@
undef($sth);
}
+ #######################################################################
+ #retrieve_news
+ #######################################################################
+ sub retrieve_news{
+ my $self = shift;
+ my $af = $self->{af};
+ my $num = shift;
+
+ debug_print("NewsAggregator::retrieve_news: start.");
+
+ ##############################
+ #retrieve all friend records from DB
+ my $query = "SELECT datetime, af_id, nickname, app_install_name, title, description, creator, URL FROM AFuser_CORE_nghr_news order by datetime desc";
+ my $sth;
+ eval{
+ $sth = $af->getDB->prepare($query);
+ $sth->execute();
+ };
+ if($@){
+ throw Affelio::exception::DBException($af->getDB->errstr);
+ }
+
+ debug_print("NewsAggregator::retrieve_news: end.");
+ return($sth);
+ }
+
#######################################################################
#get_one
@@ -164,12 +190,6 @@
#######################################################################
- #save
- #######################################################################
-
-
-
- #######################################################################
#show
#######################################################################