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

Changeset 6438


Ignore:
Timestamp:
Apr 9, 2008, 9:14:26 AM (12 years ago)
Author:
ogawa
Message:

#2059:ORDER BY指定追加、birth_値を更新前にキャスト

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/trunk/webapp/lib/db/member.php

    r6040 r6438  
    8787            " AND cm.public_flag IN ($flags)" .
    8888            ' AND cm.c_profile_id = cp.c_profile_id' .
    89         ' ORDER BY cp.sort_order, cm.c_member_profile_id';
     89        ' ORDER BY cp.sort_order, cp.c_profile_id, cm.c_member_profile_id';
    9090    $profile = db_get_all($sql, array(intval($c_member_id)));
    9191
     
    209209             ' INNER JOIN c_profile AS p USING (c_profile_id)' .
    210210        ' WHERE m.c_member_pre_id = ?' .
    211         ' ORDER BY p.sort_order, m.c_member_pre_profile_id';
     211        ' ORDER BY p.sort_order, p.c_profile_id, m.c_member_pre_profile_id';
    212212    $params = array(intval($c_member['c_member_pre_id']));
    213213    $profile = db_get_all($sql, $params);
     
    482482function db_member_c_profile_list4null()
    483483{
    484     $hint = db_mysql_hint('FORCE INDEX (sort_order)');
    485     $sql = 'SELECT * FROM c_profile' . $hint . ' ORDER BY sort_order';
     484    $sql = 'SELECT * FROM c_profile ORDER BY sort_order, c_profile_id';
    486485    return db_get_all($sql);
    487486}
     
    489488function db_member_c_profile_option_list4c_profile_id($c_profile_id)
    490489{
    491     $sql = 'SELECT * FROM c_profile_option WHERE c_profile_id = ? ORDER BY sort_order';
     490    $sql = 'SELECT * FROM c_profile_option WHERE c_profile_id = ? ORDER BY sort_order, c_profile_option_id';
    492491    $params = array(intval($c_profile_id));
    493492    return db_get_all($sql, $params);
     
    859858                " WHERE c_profile_option_id IN (". implode(",", array_map('intval', $v)). ")" .
    860859                " AND c_profile_id = ?".
    861                 " ORDER BY sort_order";
     860                " ORDER BY sort_order, c_profile_option_id";
    862861            $params = array(intval($c_profile['c_profile_id']));
    863862            $list = db_get_all($sql, $params);
     
    10641063    $data = array(
    10651064        'nickname'    => $c_member['nickname'],
    1066         'birth_year'  => $c_member['birth_year'],
    1067         'birth_month' => $c_member['birth_month'],
    1068         'birth_day'   => $c_member['birth_day'],
     1065        'birth_year'  => intval($c_member['birth_year']),
     1066        'birth_month' => intval($c_member['birth_month']),
     1067        'birth_day'   => intval($c_member['birth_day']),
    10691068        'public_flag_birth_year' => $c_member['public_flag_birth_year'],
    10701069        'c_member_id_invite'  => intval($c_member['c_member_id_invite']),
     
    11241123        'public_flag_birth_year' => $profs['public_flag_birth_year'],
    11251124        'r_date' => db_now(),
     1125        'u_datetime' => db_now(),
    11261126        'is_receive_ktai_mail' => 1,
    11271127        'c_member_id_invite' => intval($profs['c_member_id_invite']),
     
    11581158        'session' => $c_member_pre_secure['session'],
    11591159        'nickname'    => $c_member_pre_secure['nickname'],
    1160         'birth_year'  => $c_member_pre_secure['birth_year'],
    1161         'birth_month' => $c_member_pre_secure['birth_month'],
    1162         'birth_day'   => $c_member_pre_secure['birth_day'],
     1160        'birth_year'  => intval($c_member_pre_secure['birth_year']),
     1161        'birth_month' => intval($c_member_pre_secure['birth_month']),
     1162        'birth_day'   => intval($c_member_pre_secure['birth_day']),
    11631163        'public_flag_birth_year' => $c_member_pre_secure['public_flag_birth_year'],
    11641164        'c_password_query_id' => intval($c_member_pre_secure['c_password_query_id']),
     
    17891789{
    17901790    $data = array(
    1791     "c_member_id"=>$c_member_id,
    1792     "username"=>$username,
     1791        'c_member_id' => intval($c_member_id),
     1792        'username' => $username,
    17931793    );
    17941794    db_insert('c_username', $data);
Note: See TracChangeset for help on using the changeset viewer.