Changeset 22856 for branches/version-2_13-dev/data/class/SC_SelectSql.php
- Timestamp:
- 2013/06/08 16:35:27 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13-dev/data/class/SC_SelectSql.php
r22739 r22856 23 23 24 24 /* ---- SQL文を作るクラス ---- */ 25 class SC_SelectSql 25 class SC_SelectSql 26 26 { 27 28 27 var $sql; 29 28 … … 59 58 { 60 59 $return = '%' .$val. '%'; 60 61 61 return $return; 62 62 } … … 65 65 function selectRange($from, $to, $column) 66 66 { 67 68 67 // ある単位のみ検索($from = $to) 69 68 if ($from == $to) { … … 83 82 $return = array($from, $to); 84 83 } 84 85 85 return $return; 86 86 } … … 131 131 $return = array(); 132 132 foreach ($arr as $data) { 133 134 133 if (count($arr) > 1) { 135 134 if (!is_null($data)) { … … 149 148 } 150 149 $this->setWhere($item); 150 151 151 return $return; 152 152 } … … 169 169 $item = "({$item}) "; 170 170 $this->setWhere($item); 171 171 172 return $return; 172 173 } … … 188 189 $item = "({$item}) "; 189 190 $this->setWhere($item); 191 190 192 return $return; 191 193 } … … 200 202 function setWhereByOR($arrWhere) 201 203 { 202 203 204 $count = count($arrWhere); 204 205 … … 212 213 213 214 if ($this->where) { 214 215 215 $this->where .= ' AND ' . $statement; 216 216 217 217 } else { 218 219 218 $this->where = 'WHERE ' . $statement; 220 219 } … … 243 242 if ($where != '') { 244 243 if ($this->where) { 245 246 244 $this->where .= ' AND ' . $where; 247 245 248 246 } else { 249 250 247 $this->where = 'WHERE ' . $where; 251 248 } … … 255 252 function setOrder($order) 256 253 { 257 258 254 $this->order = 'ORDER BY ' . $order; 259 255 … … 262 258 function setGroup($group) 263 259 { 264 265 260 $this->group = 'GROUP BY ' . $group; 266 261
Note: See TracChangeset
for help on using the changeset viewer.