Index: /temp/trunk/html/admin/batch/daily.php
===================================================================
--- /temp/trunk/html/admin/batch/daily.php	(revision 5956)
+++ /temp/trunk/html/admin/batch/daily.php	(revision 6964)
@@ -238,4 +238,5 @@
 	$end_date = date("Y/m/d",strtotime("1 day" ,strtotime($end_date)));
 	// Ç¯ÎðËè¤Ë½¸·×¤¹¤ë¡£
+	/*
 	for($i = 0; $i <= $age_loop; $i++) {
 		$where = $base_where . " AND order_birth >= cast('$start_date' as date)";
@@ -252,4 +253,17 @@
 		$start_date = date("Y/m/d",strtotime("-10 year",strtotime($start_date)));
 	}
+	*/
+	for($i = 0; $i <= $age_loop; $i++) {
+	    $start_age = $i * 10;
+	    $where = $base_where . " AND order_birth >= cast('$start_date' as date) -interval '$start_age year'";
+	    if($i < $age_loop) {
+	        $end_age = $start_age+9;
+	        $where = $where . " AND order_birth < cast('$end_date' as date) -interval '$start_age year'";
+	    }else{
+	        $where = $base_where . " AND order_birth < cast('$end_date' as date) -interval '$start_age year'";
+	        $end_age = 999;
+	    }
+	    lfBatOrderAgeSub($sql . $where, $start, $end, $start_age, $end_age, 1);
+	}
 
 	// ÃÂÀ¸ÆüÆþÎÏ¤Ê¤·
@@ -266,4 +280,5 @@
 	$end_date = date("Y/m/d",strtotime("1 day" ,strtotime($end_date)));
 	// Ç¯ÎðËè¤Ë½¸·×¤¹¤ë¡£
+	/*
 	for($i = 0; $i <= $age_loop; $i++) {
 		$where = $base_where . " AND order_birth >= cast('$start_date' as date)";
@@ -280,4 +295,18 @@
 		$start_date = date("Y/m/d",strtotime("-10 year",strtotime($start_date)));
 	}
+	*/
+	for($i = 0; $i <= $age_loop; $i++) {
+	    $start_age = $i * 10;
+	    $where = $base_where . " AND order_birth >= cast('$start_date' as date) -interval '$start_age year'";
+	    if($i < $age_loop) {
+	        $end_age = $start_age+9;
+	        $where = $where . " AND order_birth < cast('$end_date' as date) -interval '$start_age year'";
+	    }else{
+	        $where = $base_where . " AND order_birth < cast('$end_date' as date) -interval '$start_age year'";
+	        $end_age = 999;
+	    }
+	    lfBatOrderAgeSub($sql . $where, $start, $end, $start_age, $end_age, 1);
+	}
+
 	// ÃÂÀ¸ÆüÆþÎÏ¤Ê¤·
 	$where = $base_where . " AND order_birth IS NULL AND del_flg = 0";
