Changeset 21385 for branches/version-2_11-dev/test/createEcCubeData-v25.php
- Timestamp:
- 2012/01/02 15:15:43 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/test/createEcCubeData-v25.php
r21372 r21385 49 49 50 50 /** 商品の生成数 */ 51 define("PRODUCTS_VOLUME", 100 0);51 define("PRODUCTS_VOLUME", 100); 52 52 53 53 // }}} … … 107 107 var $arrClassCategory_id2 = array(); 108 108 109 /** 削除するか */ 110 var $delete = false; 111 109 112 /** 110 113 * コンストラクタ. … … 131 134 132 135 print("カテゴリを生成しています...\n"); 136 137 if ($this->delete) { 138 $this->objQuery->delete('dtb_category'); 139 } 133 140 134 141 $count = 0; … … 195 202 // 規格データ生成 196 203 print("規格データを生成しています...\n"); 204 205 if ($this->delete) { 206 $this->objQuery->delete('dtb_class'); 207 } 208 197 209 $this->createClass("Size"); 198 210 $this->createClass("Color"); … … 201 213 // 規格分類データ生成 202 214 print("規格分類データを生成しています...\n"); 215 216 if ($this->delete) { 217 $this->objQuery->delete('dtb_classcategory'); 218 } 203 219 204 220 // 規格1 … … 226 242 print("商品と規格の関連づけを行います...\n"); 227 243 244 if ($this->delete) { 245 $this->objQuery->delete('dtb_class_combination'); 246 $this->objQuery->delete('dtb_products_class'); 247 } 248 228 249 foreach ($this->arrProduct_id as $product_id) { 229 250 $this->createProductsClass($product_id); … … 240 261 241 262 print("商品を生成しています...\n"); 263 264 if ($this->delete) { 265 $this->objQuery->delete('dtb_products'); 266 } 267 242 268 for ($i = 0; $i < PRODUCTS_VOLUME; $i++) { 243 269 $sqlval['product_id'] = $this->objQuery->nextval("dtb_products_product_id"); … … 337 363 printf("商品ID %d の商品規格を生成しています...\n", $product_id); 338 364 339 340 365 $sqlval['product_id'] = $product_id; 341 366 $sqlval['product_type_id'] = 1; … … 392 417 393 418 print("商品とカテゴリの関連づけを行います...\n"); 419 420 if ($this->delete) { 421 $this->objQuery->delete('dtb_product_categories'); 422 } 423 394 424 $this->createProductsCategories($this->arrCategory1, "大カテゴリ"); 395 425 $this->createProductsCategories($this->arrCategory2, "中カテゴリ");
Note: See TracChangeset
for help on using the changeset viewer.