Changeset 21684 for branches/version-2_12-dev/data/class/SC_SelectSql.php
- Timestamp:
- 2012/03/26 21:44:52 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/SC_SelectSql.php
r21515 r21684 108 108 109 109 // 開始~終了 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 != '') 112 ) { 112 113 $this->setWhere($column . ' >= ? AND ' . $column . ' < date(?)'); 113 114 $return[] = $date1; … … 130 131 131 132 if (count($arr) > 1) { 132 if(! is_null($data)) $item .= $ItemStr . ' = ? OR '; 133 if (!is_null($data)) { 134 $item .= $ItemStr . ' = ? OR '; 135 } 133 136 } else { 134 if(! is_null($data)) $item = $ItemStr . ' = ?'; 137 if (!is_null($data)) { 138 $item = $ItemStr . ' = ?'; 139 } 135 140 } 136 141 $return[] = $data; 137 142 } 138 143 139 if( count($arr) > 1) $item = '(' . rtrim($item, ' OR ') . ')'; 144 if (count($arr) > 1) { 145 // FIXME 多分この rtrim の使い方は不適切(偶然動作しそうだが) 146 $item = '(' . rtrim($item, ' OR ') . ')'; 147 } 140 148 $this->setWhere($item); 141 149 return $return; … … 190 198 191 199 for ($i = 0; $i < $count; $i++) { 192 193 if( isset($arrWhere[$i]['value'])) $statement .= $arrWhere[$i]['column'] .' = ' . SC_Utils_Ex::sfQuoteSmart($arrWhere[$i]['value']) .' OR ' ; 200 if (isset($arrWhere[$i]['value'])) { 201 $statement .= $arrWhere[$i]['column'] .' = ' . SC_Utils_Ex::sfQuoteSmart($arrWhere[$i]['value']) .' OR '; 202 } 194 203 } 195 204
Note: See TracChangeset
for help on using the changeset viewer.