Changeset 17815


Ignore:
Timestamp:
2009/02/20 11:16:07 (15 years ago)
Author:
kajiwara
Message:

MySQL4以下にてSQLの指定がうまくいかず、一括削除ができなかった部分を改修

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_4/data/class/pages/admin/products/LC_Page_Admin_Products.php

    r17777 r17815  
    268268                    break; 
    269269                case 'delete_all': 
     270                    // 検索結果の取得 
     271                    $col = "product_id"; 
     272                    $from = "vw_products_nonclass AS noncls "; 
     273                    $arrProducts = $objQuery->select($col, $from, $where, $arrval); 
    270274                    // 検索結果をすべて削除 
    271                     $where = "product_id IN (SELECT product_id FROM vw_products_nonclass AS noncls  WHERE $where)"; 
    272275                    $sqlval['del_flg'] = 1; 
    273                     $objQuery->update("dtb_products", $sqlval, $where, $arrval); 
     276                    $where = "product_id = ?"; 
     277                    if (count($arrProducts) > 0) { 
     278                        foreach ($arrProducts as $key => $val) { 
     279                            $objQuery->update("dtb_products", $sqlval, $where, array($arrProducts[$key]["product_id"])); 
     280                        } 
     281                    } 
    274282                    break; 
    275283                default: 
Note: See TracChangeset for help on using the changeset viewer.