ここの情報は古いです。ご理解頂いた上でお取り扱いください。

Changeset 3661


Ignore:
Timestamp:
Aug 9, 2007, 4:51:23 PM (12 years ago)
Author:
ogawa
Message:

#957:admin:世代別メンバー表示で、誕生日を迎えたユーザの世代が更新されない

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/modules/admin/lib/db_admin.php

    r3625 r3661  
    15991599    );
    16001600   
    1601     $sql = "SELECT ((YEAR(CURDATE()) - birth_year)- " .
    1602         "(RIGHT(CURDATE(),5)<CONCAT(birth_month,'-',birth_day))) " .
    1603         "AS age FROM c_member WHERE birth_year <> 0;";
     1601    $today = getdate();
     1602    $mmdd = $today['mon'] * 100 + $today['mday'];
     1603    $sql = 'SELECT ' . $today['year'] . ' - birth_year'
     1604         . ' - (' . $mmdd . ' < (birth_month * 100 + birth_day))'
     1605         . ' AS age FROM c_member WHERE birth_year <> 0';
    16041606    $lst = db_get_all($sql);
    16051607
Note: See TracChangeset for help on using the changeset viewer.