Changeset 21481 for branches/version-2_12-dev/test/createEcCubeData-v25.php
- Timestamp:
- 2012/02/11 05:48:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/test/createEcCubeData-v25.php
r21480 r21481 43 43 44 44 /** 規格1の生成数 */ 45 define( "CLASSCATEGORY1_VOLUME", 10);45 define('CLASSCATEGORY1_VOLUME', 10); 46 46 47 47 /** 規格2の生成数 */ 48 define( "CLASSCATEGORY2_VOLUME", 10);48 define('CLASSCATEGORY2_VOLUME', 10); 49 49 50 50 /** 商品の生成数 */ … … 145 145 $sqlval['create_date'] = 'CURRENT_TIMESTAMP'; 146 146 $sqlval['update_date'] = 'CURRENT_TIMESTAMP'; 147 $sqlval['del_flg'] = (string) "0";147 $sqlval['del_flg'] = (string) '0'; 148 148 149 149 // 大カテゴリを生成 150 150 for ($i = 0; $i < TOP_CATEGORIES_VOLUME; $i++) { 151 151 $sqlval['category_name'] = sprintf("Category%d00", $i); 152 $sqlval['parent_category_id'] = (string) "0";152 $sqlval['parent_category_id'] = (string) '0'; 153 153 $sqlval['level'] = 1; 154 154 $sqlval['rank'] = $this->lfGetTotalCategoryrank() - $count; 155 $sqlval['category_id'] = $this->objQuery->nextVal( "dtb_category_category_id");156 157 $this->objQuery->insert( "dtb_category", $sqlval);155 $sqlval['category_id'] = $this->objQuery->nextVal('dtb_category_category_id'); 156 157 $this->objQuery->insert('dtb_category', $sqlval); 158 158 $this->arrCategory1[] = $sqlval['category_id']; 159 159 $count++; … … 167 167 $sqlval['level'] = 2; 168 168 $sqlval['rank'] = $this->lfGetTotalCategoryrank() - $count; 169 $sqlval['category_id'] = $this->objQuery->nextVal( "dtb_category_category_id");170 171 $this->objQuery->insert( "dtb_category", $sqlval);169 $sqlval['category_id'] = $this->objQuery->nextVal('dtb_category_category_id'); 170 171 $this->objQuery->insert('dtb_category', $sqlval); 172 172 $this->arrCategory2[] = $sqlval['category_id']; 173 173 $count++; … … 182 182 $sqlval['level'] = 3; 183 183 $sqlval['rank'] = $this->lfGetTotalCategoryrank() - $count; 184 $sqlval['category_id'] = $this->objQuery->nextVal( "dtb_category_category_id");185 186 $this->objQuery->insert( "dtb_category", $sqlval);184 $sqlval['category_id'] = $this->objQuery->nextVal('dtb_category_category_id'); 185 186 $this->objQuery->insert('dtb_category', $sqlval); 187 187 $this->arrCategory3[] = $sqlval['category_id']; 188 188 $count++; … … 207 207 } 208 208 209 $this->createClass( "Size");210 $this->createClass( "Color");209 $this->createClass('Size'); 210 $this->createClass('Color'); 211 211 print("\n"); 212 212 … … 221 221 for ($i = 0; $i < CLASSCATEGORY1_VOLUME; $i++) { 222 222 $this->createClassCategory($this->arrSize[$i], 223 $this->arrclass_id[0], "size");223 $this->arrclass_id[0], 'size'); 224 224 } 225 225 … … 227 227 for ($i = 0; $i < CLASSCATEGORY2_VOLUME; $i++) { 228 228 $this->createClassCategory($this->arrColor[$i], 229 $this->arrclass_id[1], "color");229 $this->arrclass_id[1], 'color'); 230 230 } 231 231 … … 267 267 268 268 for ($i = 0; $i < PRODUCTS_VOLUME; $i++) { 269 $sqlval['product_id'] = $this->objQuery->nextval( "dtb_products_product_id");269 $sqlval['product_id'] = $this->objQuery->nextval('dtb_products_product_id'); 270 270 $sqlval['name'] = sprintf("商品%d", $i); 271 271 $sqlval['status'] = 1; … … 277 277 $sqlval['main_large_image'] = "08311203_44f651959bcb5.jpg"; 278 278 $sqlval['sub_comment1'] = "コメント"; 279 $sqlval['del_flg'] = (string) "0";279 $sqlval['del_flg'] = (string) '0'; 280 280 $sqlval['creator_id'] = 2; 281 281 $sqlval['create_date'] = 'CURRENT_TIMESTAMP'; 282 282 $sqlval['update_date'] = 'CURRENT_TIMESTAMP'; 283 283 $sqlval['deliv_date_id'] = 2; 284 $this->objQuery->insert( "dtb_products", $sqlval);284 $this->objQuery->insert('dtb_products', $sqlval); 285 285 286 286 $this->arrProduct_id[] = $sqlval['product_id']; … … 298 298 function createClass($class_name) { 299 299 // class_idを取得 300 $sqlval['class_id'] = $this->objQuery->nextVal( "dtb_class_class_id");300 $sqlval['class_id'] = $this->objQuery->nextVal('dtb_class_class_id'); 301 301 $sqlval['name'] = $class_name; 302 302 $arrRaw['rank'] = "(SELECT x.rank FROM (SELECT CASE … … 309 309 $sqlval['create_date'] = 'CURRENT_TIMESTAMP'; 310 310 $sqlval['update_date'] = 'CURRENT_TIMESTAMP'; 311 $sqlval['del_flg'] = (string) "0";312 $this->objQuery->insert( "dtb_class", $sqlval, $arrRaw);311 $sqlval['del_flg'] = (string) '0'; 312 $this->objQuery->insert('dtb_class', $sqlval, $arrRaw); 313 313 314 314 $this->arrclass_id[] = $sqlval['class_id']; … … 323 323 */ 324 324 function createClassCategory($classcategory_name, $class_id, $class_name) { 325 $sqlval['classcategory_id'] = $this->objQuery->nextVal( "dtb_classcategory_classcategory_id");325 $sqlval['classcategory_id'] = $this->objQuery->nextVal('dtb_classcategory_classcategory_id'); 326 326 $sqlval['name'] = $classcategory_name; 327 327 $sqlval['class_id'] = $class_id; … … 336 336 $sqlval['create_date'] = 'CURRENT_TIMESTAMP'; 337 337 $sqlval['update_date'] = 'CURRENT_TIMESTAMP'; 338 $sqlval['del_flg'] = (string) "0";339 340 $this->objQuery->insert( "dtb_classcategory", $sqlval, $arrRaw);338 $sqlval['del_flg'] = (string) '0'; 339 340 $this->objQuery->insert('dtb_classcategory', $sqlval, $arrRaw); 341 341 342 342 switch ($class_name) { 343 case "size":343 case 'size': 344 344 $this->arrClassCategory_id1[] = $sqlval['classcategory_id']; 345 345 break; 346 346 347 case "color":347 case 'color': 348 348 $this->arrClassCategory_id2[] = $sqlval['classcategory_id']; 349 349 break; … … 380 380 $c1['class_combination_id'] = $this->objQuery->nextVal('dtb_class_combination_class_combination_id'); 381 381 $c1['level'] = 1; 382 $this->objQuery->insert( "dtb_class_combination", $c1);382 $this->objQuery->insert('dtb_class_combination', $c1); 383 383 384 384 $c2['classcategory_id'] = $classCategory_id2; … … 386 386 $c2['parent_class_combination_id'] = $c1['class_combination_id']; 387 387 $c2['level'] = 2; 388 $this->objQuery->insert( "dtb_class_combination", $c2);388 $this->objQuery->insert('dtb_class_combination', $c2); 389 389 390 390 $sqlval['product_class_id'] = … … 393 393 394 394 $sqlval['class_combination_id'] = $c2['class_combination_id']; 395 $this->objQuery->insert( "dtb_products_class", $sqlval);395 $this->objQuery->insert('dtb_products_class', $sqlval); 396 396 397 397 $count++; … … 404 404 $sqlval['class_combination_id'] = null; 405 405 $sqlval['del_flg'] = 1; 406 $this->objQuery->insert( "dtb_products_class", $sqlval);406 $this->objQuery->insert('dtb_products_class', $sqlval); 407 407 408 408 print("\n"); … … 444 444 $sqlval['rank'] = $count; 445 445 446 $this->objQuery->insert( "dtb_product_categories", $sqlval);446 $this->objQuery->insert('dtb_product_categories', $sqlval); 447 447 $count++; 448 448 print("$"); … … 460 460 ,"m8 1/2(26.5cm)" 461 461 ,"m8(26cm)" 462 , "43"463 , "42"464 , "41"462 ,'43' 463 ,'42' 464 ,'41' 465 465 ,"43(27.0cm?27.5cm)" 466 466 ,"42(26.5cm?27.0cm)" … … 468 468 ,"42(約27.5cm)" 469 469 ,"41(約26.5cm)" 470 , "W36"471 , "W34"472 , "W32"473 , "43"474 , "42"475 , "41"476 , "m11"477 , "m10"470 ,'W36' 471 ,'W34' 472 ,'W32' 473 ,'43' 474 ,'42' 475 ,'41' 476 ,'m11' 477 ,'m10' 478 478 ,"m9.5" 479 , "m9"480 , "m8"479 ,'m9' 480 ,'m8' 481 481 ,'FREE' 482 482 ,'XS' … … 487 487 ,"25-27" 488 488 ,"27-29" 489 , "W28"490 , "W29"491 , "W30"492 , "W31"493 , "W32"494 , "W33"495 , "W34"496 , "W35"497 , "W36"498 , "4"499 , "6"500 , "8"501 , "10"502 , "12"503 , "10cm"504 , "12cm"505 , "14cm"506 , "16cm"507 , "18cm"508 , "20cm"509 , "22cm"510 , "24cm"511 , "26cm"512 , "28cm"513 , "30cm"514 , "32cm"515 , "34cm"516 , "36cm"517 , "38cm"518 , "40cm"519 , "10g"520 , "20g"521 , "30g"522 , "40g"523 , "50g"524 , "60g"525 , "70g"526 , "80g"527 , "90g"528 , "100g"529 , "110g"530 , "120g"531 , "130g"532 , "140g"533 , "150g"534 , "160g"535 , "170g"536 , "180g"537 , "190g"538 , "200g"539 , "8inch"540 , "10inch"541 , "12inch"542 , "14inch"543 , "16inch"544 , "18inch"545 , "20inch"546 , "22inch"547 , "24inch"548 , "26inch"549 , "28inch"550 , "30inch"551 , "32inch"552 , "34inch"553 , "36inch"554 , "38inch"489 ,'W28' 490 ,'W29' 491 ,'W30' 492 ,'W31' 493 ,'W32' 494 ,'W33' 495 ,'W34' 496 ,'W35' 497 ,'W36' 498 ,'4' 499 ,'6' 500 ,'8' 501 ,'10' 502 ,'12' 503 ,'10cm' 504 ,'12cm' 505 ,'14cm' 506 ,'16cm' 507 ,'18cm' 508 ,'20cm' 509 ,'22cm' 510 ,'24cm' 511 ,'26cm' 512 ,'28cm' 513 ,'30cm' 514 ,'32cm' 515 ,'34cm' 516 ,'36cm' 517 ,'38cm' 518 ,'40cm' 519 ,'10g' 520 ,'20g' 521 ,'30g' 522 ,'40g' 523 ,'50g' 524 ,'60g' 525 ,'70g' 526 ,'80g' 527 ,'90g' 528 ,'100g' 529 ,'110g' 530 ,'120g' 531 ,'130g' 532 ,'140g' 533 ,'150g' 534 ,'160g' 535 ,'170g' 536 ,'180g' 537 ,'190g' 538 ,'200g' 539 ,'8inch' 540 ,'10inch' 541 ,'12inch' 542 ,'14inch' 543 ,'16inch' 544 ,'18inch' 545 ,'20inch' 546 ,'22inch' 547 ,'24inch' 548 ,'26inch' 549 ,'28inch' 550 ,'30inch' 551 ,'32inch' 552 ,'34inch' 553 ,'36inch' 554 ,'38inch' 555 555 ); 556 556 557 557 /** 規格2 */ 558 var $arrColor = array( "white"559 , "whitesmoke"560 , "snow"561 , "ghostwhite"562 , "mintcream"563 , "azure"564 , "ivory"565 , "floralwhite"566 , "aliceblue"567 , "lavenderblush"568 , "seashell"569 , "honeydew"570 , "lightyellow"571 , "oldlace"572 , "cornsilk"573 , "linen"574 , "lemonchiffon"575 , "lavender"576 , "beige"577 , "lightgoldenrodyellow"578 , "mistyrose"579 , "papayawhip"580 , "antiquewhite"581 , "lightcyan"582 , "cyan"583 , "aqua"584 , "darkcyan"585 , "teal"586 , "darkslategray"587 , "turquoise"588 , "paleturquoise"589 , "mediumturquoise"590 , "aquamarine"591 , "gainsboro"592 , "lightgray"593 , "silver"594 , "darkgray"595 , "gray"596 , "dimgray"597 , "black"598 , "powderblue"599 , "lightblue"600 , "lightskyblue"601 , "skyblue"602 , "darkturquoise"603 , "deepskyblue"604 , "dodgerblue"605 , "royalblue"606 , "cornflowerblue"607 , "cadetblue"608 , "lightsteelblue"609 , "steelblue"610 , "lightslategray"611 , "slategray"612 , "blue"613 , "mediumblue"614 , "darkblue"615 , "navy"616 , "midnightblue"617 , "lightsalmon"618 , "darksalmon"619 , "salmon"620 , "tomato"621 , "lightcoral"622 , "coral"623 , "crimson"624 , "red"625 , "mediumorchid"626 , "mediumpurple"627 , "mediumslateblue"628 , "slateblue"629 , "blueviolet"630 , "darkviolet"631 , "darkorchid"632 , "darkslateblue"633 , "darkorchid"634 , "thistle"635 , "plum"636 , "violet"637 , "magenta"638 , "fuchsia"639 , "darkmagenta"640 , "purple"641 , "palegreen"642 , "lightgreen"643 , "lime"644 , "limegreen"645 , "forestgreen"646 , "green"647 , "darkgreen"648 , "greenyellow"649 , "chartreuse"650 , "lawngreen"651 , "yellowgreen"652 , "olivedrab"653 , "darkolivegreen"654 , "mediumaquamarine"655 , "mediumspringgreen"656 , "springgreen"657 , "darkseagreen"558 var $arrColor = array('white' 559 ,'whitesmoke' 560 ,'snow' 561 ,'ghostwhite' 562 ,'mintcream' 563 ,'azure' 564 ,'ivory' 565 ,'floralwhite' 566 ,'aliceblue' 567 ,'lavenderblush' 568 ,'seashell' 569 ,'honeydew' 570 ,'lightyellow' 571 ,'oldlace' 572 ,'cornsilk' 573 ,'linen' 574 ,'lemonchiffon' 575 ,'lavender' 576 ,'beige' 577 ,'lightgoldenrodyellow' 578 ,'mistyrose' 579 ,'papayawhip' 580 ,'antiquewhite' 581 ,'lightcyan' 582 ,'cyan' 583 ,'aqua' 584 ,'darkcyan' 585 ,'teal' 586 ,'darkslategray' 587 ,'turquoise' 588 ,'paleturquoise' 589 ,'mediumturquoise' 590 ,'aquamarine' 591 ,'gainsboro' 592 ,'lightgray' 593 ,'silver' 594 ,'darkgray' 595 ,'gray' 596 ,'dimgray' 597 ,'black' 598 ,'powderblue' 599 ,'lightblue' 600 ,'lightskyblue' 601 ,'skyblue' 602 ,'darkturquoise' 603 ,'deepskyblue' 604 ,'dodgerblue' 605 ,'royalblue' 606 ,'cornflowerblue' 607 ,'cadetblue' 608 ,'lightsteelblue' 609 ,'steelblue' 610 ,'lightslategray' 611 ,'slategray' 612 ,'blue' 613 ,'mediumblue' 614 ,'darkblue' 615 ,'navy' 616 ,'midnightblue' 617 ,'lightsalmon' 618 ,'darksalmon' 619 ,'salmon' 620 ,'tomato' 621 ,'lightcoral' 622 ,'coral' 623 ,'crimson' 624 ,'red' 625 ,'mediumorchid' 626 ,'mediumpurple' 627 ,'mediumslateblue' 628 ,'slateblue' 629 ,'blueviolet' 630 ,'darkviolet' 631 ,'darkorchid' 632 ,'darkslateblue' 633 ,'darkorchid' 634 ,'thistle' 635 ,'plum' 636 ,'violet' 637 ,'magenta' 638 ,'fuchsia' 639 ,'darkmagenta' 640 ,'purple' 641 ,'palegreen' 642 ,'lightgreen' 643 ,'lime' 644 ,'limegreen' 645 ,'forestgreen' 646 ,'green' 647 ,'darkgreen' 648 ,'greenyellow' 649 ,'chartreuse' 650 ,'lawngreen' 651 ,'yellowgreen' 652 ,'olivedrab' 653 ,'darkolivegreen' 654 ,'mediumaquamarine' 655 ,'mediumspringgreen' 656 ,'springgreen' 657 ,'darkseagreen' 658 658 ); 659 659
Note: See TracChangeset
for help on using the changeset viewer.