Changeset 17190


Ignore:
Timestamp:
2008/03/28 14:43:18 (12 years ago)
Author:
pineray
Message:

カテゴリ削除時の商品登録チェックでdtb_product_categoriesも参照するように修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/pages/admin/products/LC_Page_Admin_Products_Category.php

    r17156 r17190  
    126126            } 
    127127            // 登録商品のチェック 
    128             $where = "category_id = ? AND del_flg = 0"; 
    129             $count = $objQuery->count("dtb_products", $where, array($_POST['category_id'])); 
     128            $table = "dtb_product_categories AS T1 LEFT JOIN dtb_products AS T2 ON T1.product_id = T2.product_id"; 
     129            $where = "T1.category_id = ? AND T2.del_flg = 0"; 
     130            $count = $objQuery->count($table, $where, array($_POST['category_id'])); 
    130131            if($count != 0) { 
    131132                $this->arrErr['category_name'] = "※ カテゴリ内に商品が存在するため削除できません。<br>"; 
Note: See TracChangeset for help on using the changeset viewer.