Tadashi Okoshi
slash****@users*****
2005年 12月 19日 (月) 14:54:16 JST
Index: affelio/lib/Affelio/Managing/MyNewsManager.pm
diff -u affelio/lib/Affelio/Managing/MyNewsManager.pm:1.2 affelio/lib/Affelio/Managing/MyNewsManager.pm:1.3
--- affelio/lib/Affelio/Managing/MyNewsManager.pm:1.2 Sat Dec 10 11:14:12 2005
+++ affelio/lib/Affelio/Managing/MyNewsManager.pm Mon Dec 19 14:54:16 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: MyNewsManager.pm,v 1.2 2005/12/10 02:14:12 slash5234 Exp $
+# $Id: MyNewsManager.pm,v 1.3 2005/12/19 05:54:16 slash5234 Exp $
package Affelio::Managing::MyNewsManager;
{
@@ -63,10 +63,19 @@
debug_print("MyNews::retrieve: start [$laterthan]");
##############################
+ #application list
+ my $app_list =join("' or app_install_name='", $arg{app_list});
+ $app_list ="app_install_name='" . $app_list . "'";
+ debug_print("MyNews::retrieve: apps [$app_list]");
+
+ my $query= "SELECT nid, datetime, app_install_name, title, description, creator, URL FROM AFuser_CORE_my_news WHERE datetime > $laterthan and ($app_list)";
+ debug_print("MyNews::retrieve: query [$query]");
+
+ ##############################
#retrieve all friend records from DB
my $sth;
try{
- $sth = $af->getDB()->prepare("SELECT nid, datetime, app_install_name, title, description, creator, URL FROM AFuser_CORE_my_news WHERE datetime > $laterthan") or die $af->getDB->errstr;
+ $sth = $af->getDB()->prepare($query) or die $af->getDB->errstr;
$sth->execute;
}catch Error with{
my $e = shift;