Index: temp/trunk/html/admin/batch/daily.php
===================================================================
--- temp/trunk/html/admin/batch/daily.php	(revision 6977)
+++ temp/trunk/html/admin/batch/daily.php	(revision 8326)
@@ -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,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, 0);
+}
 	
 	// ÃÂÀ¸ÆüÆþÎÏ¤Ê¤·
