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

Changeset 6483


Ignore:
Timestamp:
Apr 9, 2008, 10:47:10 PM (13 years ago)
Author:
ebihara
Message:

#2180:db_member_c_member_config4c_member_id()でdb_get_assoc()を利用するようにし、SQL内のエイリアスを使用しないようにした

File:
1 edited

Legend:

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

    r6481 r6483  
    19601960function db_member_c_member_config4c_member_id($c_member_id)
    19611961{
    1962     $sql = 'SELECT a.*,b.name FROM c_member_config a'
    1963          . ' INNER JOIN c_member_config_option b USING(c_member_config_option_id)'
     1962    $sql = 'SELECT c_member_config_option.name, c_member_config.value'
     1963         . ' FROM c_member_config'
     1964         . ' INNER JOIN c_member_config_option USING(c_member_config_option_id)'
    19641965         . ' WHERE c_member_id = ?';
    19651966    $params = array(intval($c_member_id));
    1966     $list = db_get_all($sql, $params);
    1967 
    1968     $member_config = array();
    1969     foreach ($list as $value){
    1970         $member_config[$value['name']] = $value['value'];
    1971     }
     1967
     1968    $member_config = db_get_assoc($sql, $params);
     1969
    19721970    return $member_config;
    19731971}
Note: See TracChangeset for help on using the changeset viewer.