- Timestamp:
- 2009/05/15 16:30:40 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2/data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php
r17526 r18007 71 71 return $sql; 72 72 } 73 73 74 74 /** 75 75 * 文字コード情報を取得する 76 * 76 * 77 77 * @return array 文字コード情報 78 78 */ 79 79 function getCharSet() { 80 81 82 80 $objQuery = new SC_Query(); 81 $arrRet = $objQuery->getAll("SHOW VARIABLES LIKE 'char%'"); 82 return $arrRet; 83 83 } 84 84 85 85 /** 86 86 * テーブルの存在チェックを行う SQL 文を返す. … … 246 246 return $changesql; 247 247 } 248 248 249 249 /** 250 250 * WHERE 句置換用の配列を返す. … … 341 341 T1.create_date, 342 342 T1.update_date, 343 T1.note, 343 344 T1.deliv_date_id, 344 345 T2.product_id_sub, … … 364 365 ON T1.product_id = T2.product_id_sub) ', 365 366 366 "vw_products_allclass" => ' 367 (SELECT T1.product_id, 368 product_code_min, 369 product_code_max, 370 price01_min, 371 price01_max, 372 price02_min, 373 price02_max, 374 stock_min, 375 stock_max, 376 stock_unlimited_min, 377 stock_unlimited_max, 378 del_flg, 379 status, 380 name, 381 comment1, 382 comment2, 383 comment3, 384 main_list_comment, 385 main_image, 386 main_list_image, 387 product_flag, 388 deliv_date_id, 389 sale_limit, 390 point_rate, 391 sale_unlimited, 392 create_date, 393 deliv_fee, 394 rank 395 ,(SELECT rank AS category_rank 396 FROM dtb_category AS T4 397 WHERE T1.category_id = T4.category_id) as category_rank 398 ,(SELECT category_id AS sub_category_id 399 FROM dtb_category T4 400 WHERE T1.category_id = T4.category_id) as category_id 401 FROM (SELECT T0.product_id, 402 T0.del_flg, 403 T0.status, 404 T0.name, 405 T0.comment1, 406 T0.comment2, 407 T0.comment3, 408 T0.main_list_comment, 409 T0.main_image, 410 T0.main_list_image, 411 T0.product_flag, 412 T0.deliv_date_id, 413 T0.sale_limit, 414 T0.point_rate, 415 T0.sale_unlimited, 416 T0.create_date, 417 T0.deliv_fee, 418 T00.category_id, 419 T00.rank 420 FROM dtb_products AS T0 421 LEFT JOIN dtb_product_categories AS T00 422 USING (product_id)) AS T1 423 RIGHT JOIN (SELECT product_id as product_id_sub, 424 MIN(product_code) AS product_code_min, 425 MAX(product_code) AS product_code_max, 426 MIN(price01) AS price01_min, 427 MAX(price01) AS price01_max, 428 MIN(price02) AS price02_min, 429 MAX(price02) AS price02_max, 430 MIN(stock) AS stock_min, 431 MAX(stock) AS stock_max, 432 MIN(stock_unlimited) AS stock_unlimited_min, 433 MAX(stock_unlimited) AS stock_unlimited_max 434 FROM dtb_products_class GROUP BY product_id) AS T2 435 ON T1.product_id = T2.product_id_sub 436 ) ', 367 "vw_products_allclass" => ' 368 (SELECT 369 T2.product_id 370 ,T1.product_code_min 371 ,T1.product_code_max 372 ,T1.price01_min 373 ,T1.price01_max 374 ,T1.price02_min 375 ,T1.price02_max 376 ,T1.stock_min 377 ,T1.stock_max 378 ,T1.stock_unlimited_min 379 ,T1.stock_unlimited_max 380 ,T2.del_flg 381 ,T2.status 382 ,T2.name 383 ,T2.comment1 384 ,T2.comment2 385 ,T2.comment3 386 ,T2.main_list_comment 387 ,T2.main_image 388 ,T2.main_list_image 389 ,T2.product_flag 390 ,T2.deliv_date_id 391 ,T2.sale_limit 392 ,T2.point_rate 393 ,T2.sale_unlimited 394 ,T2.create_date 395 ,T2.deliv_fee 396 ,T3.rank 397 ,T4.rank AS category_rank 398 ,T4.category_id 399 FROM 400 ( 401 (dtb_products AS T2 RIGHT JOIN 402 (SELECT 403 product_id AS product_id_sub 404 ,MIN(product_code) AS product_code_min 405 ,MAX(product_code) AS product_code_max 406 ,MIN(price01) AS price01_min 407 ,MAX(price01) AS price01_max 408 ,MIN(price02) AS price02_min 409 ,MAX(price02) AS price02_max 410 ,MIN(stock) AS stock_min 411 ,MAX(stock) AS stock_max 412 ,MIN(stock_unlimited) AS stock_unlimited_min 413 ,MAX(stock_unlimited) AS stock_unlimited_max 414 FROM dtb_products_class GROUP BY product_id 415 ) AS T1 ON T1.product_id_sub = T2.product_id 416 ) LEFT JOIN dtb_product_categories AS T3 ON T2.product_id = T3.product_id 417 ) LEFT JOIN dtb_category AS T4 ON T3.category_id = T4.category_id 418 ) ', 437 419 438 420 "vw_products_allclass_detail" => '
Note: See TracChangeset
for help on using the changeset viewer.