Example #1
0
function do_config_prof_insert_c_member_profile($c_member_id, $c_profile_id, $c_profile_option_id, $value, $public_flag)
{
    return db_member_insert_c_member_profile($c_member_id, $c_profile_id, $c_profile_option_id, $value, $public_flag);
}
Example #2
0
function db_member_update_c_member_profile($c_member_id, $c_member_profile_list)
{
    //function cache削除
    cache_drop_c_member_profile($c_member_id);
    foreach ($c_member_profile_list as $item) {
        $sql = 'DELETE FROM c_member_profile' . ' WHERE c_member_id = ? AND c_profile_id = ?';
        $params = array(intval($c_member_id), intval($item['c_profile_id']));
        db_query($sql, $params);
        if (is_array($item['value']) && !empty($item['value'])) {
            foreach ($item['value'] as $key => $value) {
                db_member_insert_c_member_profile($c_member_id, $item['c_profile_id'], $key, $value, $item['public_flag']);
            }
        } else {
            if (empty($item['value'])) {
                $item['value'] = "";
            }
            db_member_insert_c_member_profile($c_member_id, $item['c_profile_id'], $item['c_profile_option_id'], $item['value'], $item['public_flag']);
        }
    }
}