Ignore:
Timestamp:
2012/02/03 11:07:25 (10 years ago)
Author:
Seasoft
Message:

#1626 (SQLチューニングによる商品一覧処理の高速化)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/SC_Product.php

    r21420 r21433  
    7575        $table = <<< __EOS__ 
    7676            dtb_products AS alldtl 
    77             LEFT JOIN dtb_products_class 
    78                 ON alldtl.product_id = dtb_products_class.product_id 
    79             LEFT JOIN dtb_product_categories 
    80                 ON alldtl.product_id = dtb_product_categories.product_id 
    8177__EOS__; 
    8278        $objQuery->setGroupBy('alldtl.product_id'); 
     
    118114        $table = <<< __EOS__ 
    119115            dtb_products AS alldtl 
    120             LEFT JOIN dtb_products_class 
    121                 ON alldtl.product_id = dtb_products_class.product_id 
    122             LEFT JOIN dtb_product_categories 
    123                 ON alldtl.product_id = dtb_product_categories.product_id 
    124 __EOS__; 
    125         $objQuery->setGroupBy('alldtl.product_id'); 
    126         $sql_base = $objQuery->getSql('alldtl.product_id',$table); 
    127         return $objQuery->getOne( "SELECT count(*) FROM ( $sql_base ) as t" , $arrVal); 
     116__EOS__; 
     117        return $objQuery->count($table, '', $arrVal); 
    128118    } 
    129119 
Note: See TracChangeset for help on using the changeset viewer.