Ignore:
Timestamp:
2006/09/17 12:54:00 (20 years ago)
Author:
kakinaka
Message:

blank

File:
1 edited

Legend:

Unmodified
Added
Removed
  • temp/trunk/html/admin/batch/daily.php

    r4832 r4833  
    226226    $base_where = "WHERE (create_date BETWEEN ? AND ?) AND customer_id <> 0 AND del_flg = 0 "; 
    227227    //$where = $base_where . " AND (to_number(to_char(age(current_timestamp, order_birth), 'YYY'), 999) BETWEEN ? AND ?) "; 
    228     $where = $base_where . " AND order_birth BETWEEN ? AND ? "; 
    229      
    230     sfprintr(   date("Y/m/d",strtotime(time()))); 
    231      
     228    //$where = $base_where . " AND order_birth BETWEEN ? AND ? "; 
    232229     
    233230    $end_date = date("Y/m/d",strtotime("-10 year")); 
    234231    $start_date = date("Y/m/d",strtotime("1 day" ,strtotime($end_date))); 
    235232     
    236      
    237233    $end_date = date("Y/m/d H:i:s", time());  
    238234    $start_date = date("Y/m/d",strtotime("-10 year")); 
     235     
     236    sfprintr($start_date); 
     237    // ǯÎðËè¤Ë½¸·×¤¹¤ë¡£ 
     238    for($i = 0; $i <= $age_loop; $i++) { 
     239        $where = $base_where . " AND order_birth >= $start_date"; 
     240        if($i <= $age_loop) { 
     241            $where = $where . " AND order_birth <= $end_date"; 
     242        } 
     243        lfBatOrderAgeSub($sql . $where, $start, $end, $start_age, $end_age, 1); 
     244        $end_date = date("Y/m/d",strtotime("1 day" ,strtotime($start_date))); 
     245        $start_date = date("Y/m/d",strtotime("-10 year",strtotime($end_date))); 
     246    } 
     247/* 
     248    for($i = 0; $i <= $age_loop; $i++) { 
     249        $start_age = $i * 10; 
     250        $end_age = $start_age + 9; 
     251        if($i >= $age_loop) { 
     252            $end_age = 999; 
     253        } 
     254        lfBatOrderAgeSub($sql . $where, $start, $end, $start_age, $end_age, 1); 
     255    } 
     256*/ 
     257 
     258    // ÃÂÀ¸ÆüÆþÎϤʤ· 
     259    $where = $base_where . " AND order_birth IS NULL "; 
     260    lfBatOrderAgeSub($sql . $where, $start, $end, NULL, NULL, 1); 
     261 
     262    /* Èó²ñ°÷½¸·× */ 
     263     
     264    $base_where = "WHERE (create_date BETWEEN ? AND ?) AND customer_id = 0 AND del_flg = 0"; 
     265    $where = $base_where . " AND (to_number(to_char(age(current_timestamp, order_birth), 'YYY'), 999) BETWEEN ? AND ?) "; 
    239266     
    240267    // ǯÎðËè¤Ë½¸·×¤¹¤ë¡£ 
     
    245272            $end_age = 999; 
    246273        } 
    247         lfBatOrderAgeSub($sql . $where, $start, $end, $start_age, $end_age, 1); 
    248     } 
    249  
    250     // ÃÂÀ¸ÆüÆþÎϤʤ· 
    251     $where = $base_where . " AND order_birth IS NULL "; 
    252     lfBatOrderAgeSub($sql . $where, $start, $end, NULL, NULL, 1); 
    253  
    254     /* Èó²ñ°÷½¸·× */ 
    255      
    256     $base_where = "WHERE (create_date BETWEEN ? AND ?) AND customer_id = 0 AND del_flg = 0"; 
    257     $where = $base_where . " AND (to_number(to_char(age(current_timestamp, order_birth), 'YYY'), 999) BETWEEN ? AND ?) "; 
    258      
    259     // ǯÎðËè¤Ë½¸·×¤¹¤ë¡£ 
    260     for($i = 0; $i <= $age_loop; $i++) { 
    261         $start_age = $i * 10; 
    262         $end_age = $start_age + 9; 
    263         if($i >= $age_loop) { 
    264             $end_age = 999; 
    265         } 
    266274        lfBatOrderAgeSub($sql . $where, $start, $end, $start_age, $end_age, 0); 
    267275    } 
Note: See TracChangeset for help on using the changeset viewer.