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

Changeset 3393


Ignore:
Timestamp:
Jul 5, 2007, 11:50:59 AM (12 years ago)
Author:
kunitsuji1109
Message:

年代別一覧集計用のSQLを修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/work/kunitsuji1109/prj_pne_trunk/webapp/modules/admin/lib/db_admin.php

    r3281 r3393  
    15941594    );
    15951595   
    1596     $sql = "SELECT ((YEAR(CURDATE()) - birth_year)- " .
    1597         "(RIGHT(CURDATE(),5)<CONCAT(birth_month,'-',birth_day))) " .
    1598         "AS age FROM c_member WHERE birth_year <> 0;";
     1596    $sql = "SELECT (year( curdate( ) ) - birth_year) - ( if( RIGHT( CURDATE( ) , 5 ) > ( birth_month + '-' + birth_day ) , 0, 1 ) ) AS age FROM c_member";
    15991597    $lst = db_get_all($sql);
    16001598
Note: See TracChangeset for help on using the changeset viewer.