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

Ignore:
Timestamp:
May 13, 2007, 3:01:28 AM (13 years ago)
Author:
ogawa
Message:

#744:SQLの「IN ()」でカッコ内が空の場合にMySQLエラーが発生する

File:
1 edited

Legend:

Unmodified
Added
Removed
  • OpenPNE/branches/2.6.x/webapp/lib/db/member.php

    r2637 r2854  
    12811281function db_member_delete_c_member_pre($c_member_id, $delete_c_member_ids)
    12821282{
    1283     if (!is_array($delete_c_member_ids)) {
     1283    if (!(is_array($delete_c_member_ids) && $delete_c_member_ids)) {
    12841284        return false;
    12851285    }
     
    13031303function db_member_delete_c_member_ktai_pre($c_member_id, $delete_c_member_ids)
    13041304{
    1305     if (!is_array($delete_c_member_ids)) {
     1305    if (!is_array($delete_c_member_ids) && $delete_c_member_ids) {
    13061306        return false;
    13071307    }
     
    13991399    // 存在するIDのみを抽出
    14001400    $c_member_id_block = array_unique(array_map('intval', $c_member_id_block));
     1401    if (!$c_member_id_block) {
     1402        return false;
     1403    }
    14011404    $ids = implode(',', $c_member_id_block);
    14021405    $sql = 'SELECT c_member_id FROM c_member WHERE c_member_id IN ('.$ids.')';
Note: See TracChangeset for help on using the changeset viewer.