Ignore:
Timestamp:
2012/02/06 21:31:07 (12 years ago)
Author:
Seasoft
Message:

#1613 (ソース整形・ソースコメントの改善)

  • 無意味なスペースを削除
File:
1 edited

Legend:

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

    r21444 r21445  
    102102 
    103103        // 開始期間だけ指定の場合 
    104         if (( $from_year != "" ) && ( $from_month != "" ) && ( $from_day != "" ) && ( $to_year == "" ) && ( $to_month == "" ) && ( $to_day == "")) { 
     104        if (( $from_year != "") && ( $from_month != "") && ( $from_day != "") && ( $to_year == "") && ( $to_month == "") && ( $to_day == "")) { 
    105105            $this->setWhere( $column .' >= ?'); 
    106106            $return[] = $date1; 
     
    108108 
    109109        // 開始~終了 
    110         if( ( $from_year != "" ) && ( $from_month != "" ) && ( $from_day != "") && 
    111             ( $to_year != "" ) && ( $to_month != "" ) && ( $to_day != "" )) { 
     110        if( ( $from_year != "") && ( $from_month != "") && ( $from_day != "") && 
     111            ( $to_year != "") && ( $to_month != "") && ( $to_day != "")) { 
    112112            $this->setWhere( $column . ' >= ? AND ' . $column . ' < date(?)'); 
    113113            $return[] = $date1; 
     
    116116 
    117117        // 終了期間だけ指定の場合 
    118         if (( $from_year == "" ) && ( $from_month == "" ) && ( $from_day == "" ) && ( $to_year != "" ) && ( $to_month != "" ) && ( $to_day != "")) { 
     118        if (( $from_year == "") && ( $from_month == "") && ( $from_day == "") && ( $to_year != "") && ( $to_month != "") && ( $to_day != "")) { 
    119119            $this->setWhere( $column . ' < date(?)'); 
    120120            $return[] = $date2; 
     
    130130 
    131131            if (count( $arr) > 1) { 
    132                 if( ! is_null( $data )) $item .= $ItemStr . " = ? OR "; 
     132                if( ! is_null( $data)) $item .= $ItemStr . " = ? OR "; 
    133133            } else { 
    134                 if( ! is_null( $data )) $item = $ItemStr . " = ?"; 
     134                if( ! is_null( $data)) $item = $ItemStr . " = ?"; 
    135135            } 
    136136            $return[] = $data; 
    137137        } 
    138138 
    139         if( count( $arr ) > 1 )  $item = "( " . rtrim( $item, " OR " ) . ")"; 
     139        if( count( $arr) > 1)  $item = "( " . rtrim( $item, " OR ") . ")"; 
    140140        $this->setWhere( $item); 
    141141        return $return; 
     
    191191        for ($i = 0; $i < $count; $i++) { 
    192192 
    193             if( isset( $arrWhere[$i]['value'] )) $statement .= $arrWhere[$i]['column'] ." = " . SC_Utils_Ex::sfQuoteSmart($arrWhere[$i]['value']) ." OR "  ; 
    194         } 
    195  
    196         $statement = "( " . rtrim( $statement, " OR " ) . ")"; 
     193            if( isset( $arrWhere[$i]['value'])) $statement .= $arrWhere[$i]['column'] ." = " . SC_Utils_Ex::sfQuoteSmart($arrWhere[$i]['value']) ." OR "  ; 
     194        } 
     195 
     196        $statement = "( " . rtrim( $statement, " OR ") . ")"; 
    197197 
    198198        if ($this->where) { 
Note: See TracChangeset for help on using the changeset viewer.