- Timestamp:
- 2011/11/16 09:49:02 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_11-dev/data/class/SC_CustomerList.php
r21317 r21339 289 289 if (!isset($this->arrSql['search_buy_product_code'])) $this->arrSql['search_buy_product_code'] = ""; 290 290 if ( strlen($this->arrSql['search_buy_product_code']) > 0 ) { 291 $this->setWhere( "customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_code LIKE ? ) )");291 $this->setWhere( "customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_code LIKE ? ) AND del_flg = 0)"); 292 292 $search_buyproduct_code = $this->addSearchStr($this->arrSql['search_buy_product_code']); 293 293 $this->arrVal[] = $search_buyproduct_code; … … 297 297 if (!isset($this->arrSql['search_buy_product_name'])) $this->arrSql['search_buy_product_name'] = ""; 298 298 if ( strlen($this->arrSql['search_buy_product_name']) > 0 ) { 299 $this->setWhere( "customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_name LIKE ? ) )");299 $this->setWhere( "customer_id IN (SELECT customer_id FROM dtb_order WHERE order_id IN (SELECT order_id FROM dtb_order_detail WHERE product_name LIKE ? ) AND del_flg = 0)"); 300 300 $search_buyproduct_name = $this->addSearchStr($this->arrSql['search_buy_product_name']); 301 301 $this->arrVal[] = $search_buyproduct_name; … … 310 310 // カテゴリで絞込みが可能の場合 311 311 if($tmp_where != "") { 312 $this->setWhere( " customer_id IN (SELECT distinct customer_id FROM dtb_order WHERE order_id IN (SELECT distinct order_id FROM dtb_order_detail WHERE product_id IN (SELECT product_id FROM dtb_product_categories WHERE ".$tmp_where." ) )) ");312 $this->setWhere( " customer_id IN (SELECT distinct customer_id FROM dtb_order WHERE order_id IN (SELECT distinct order_id FROM dtb_order_detail WHERE product_id IN (SELECT product_id FROM dtb_product_categories WHERE ".$tmp_where." ) AND del_flg = 0)) "); 313 313 $this->arrVal = array_merge((array)$this->arrVal, (array)$tmp_arrval); 314 314 }
Note: See TracChangeset
for help on using the changeset viewer.