Changeset 21390 for branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Category.php
- Timestamp:
- 2012/01/06 19:54:03 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/pages/admin/products/LC_Page_Admin_Products_Category.php
r21357 r21390 205 205 // 子カテゴリのチェック 206 206 $where = "parent_category_id = ? AND del_flg = 0"; 207 $ count = $objQuery->count("dtb_category", $where, array($category_id));208 if ($ count > 0) {207 $exists = $objQuery->exists("dtb_category", $where, array($category_id)); 208 if ($exists) { 209 209 $this->arrErr['category_name'] = "※ 子カテゴリが存在するため削除できません。<br/>"; 210 210 return; … … 213 213 $table = "dtb_product_categories AS T1 LEFT JOIN dtb_products AS T2 ON T1.product_id = T2.product_id"; 214 214 $where = "T1.category_id = ? AND T2.del_flg = 0"; 215 $ count = $objQuery->count($table, $where, array($category_id));216 if ($ count > 0) {215 $exists = $objQuery->exists($table, $where, array($category_id)); 216 if ($exists) { 217 217 $this->arrErr['category_name'] = "※ カテゴリ内に商品が存在するため削除できません。<br/>"; 218 218 return; … … 331 331 $arrWhereVal[] = $category_id; 332 332 } 333 $ count = $objQuery->count('dtb_category', $where, $arrWhereVal);334 if ($ count > 0) {333 $exists = $objQuery->exists('dtb_category', $where, $arrWhereVal); 334 if ($exists) { 335 335 $arrErr['category_name'] = "※ 既に同じ内容の登録が存在します。<br/>"; 336 336 return $arrErr;
Note: See TracChangeset
for help on using the changeset viewer.