- Timestamp:
- 2012/02/06 11:05:15 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/db/dbfactory/SC_DB_DBFactory_MYSQL.php
r21420 r21441 153 153 */ 154 154 function getOrderTotalDaysWhereSql($type) { 155 switch ($type){155 switch ($type) { 156 156 case 'month': 157 157 $format = '%m'; … … 273 273 */ 274 274 function sfChangeArrayToString($sql){ 275 if (strpos(strtoupper($sql), 'ARRAY_TO_STRING') !== FALSE) {275 if (strpos(strtoupper($sql), 'ARRAY_TO_STRING') !== FALSE) { 276 276 preg_match_all('/ARRAY_TO_STRING.*?\(.*?ARRAY\(.*?SELECT (.+?) FROM (.+?) WHERE (.+?)\).*?\,.*?\'(.+?)\'.*?\)/is', $sql, $match, PREG_SET_ORDER); 277 277 278 foreach ($match as $item) {278 foreach ($match as $item) { 279 279 $replace = 'GROUP_CONCAT(' . $item[1] . ' SEPARATOR \'' . $item[4] . '\') FROM ' . $item[2] . ' WHERE ' . $item[3]; 280 280 $sql = str_replace($item[0], $replace, $sql); … … 296 296 $objQuery =& SC_Query_Ex::getSingletonInstance(); 297 297 $arrTblInfo = $objQuery->getTableInfo($table); 298 foreach ($arrTblInfo as $fieldInfo) {299 if (array_key_exists($fieldInfo['name'], $definition['fields'])) {300 if ($fieldInfo['nativetype'] == 'text') {298 foreach ($arrTblInfo as $fieldInfo) { 299 if (array_key_exists($fieldInfo['name'], $definition['fields'])) { 300 if ($fieldInfo['nativetype'] == 'text') { 301 301 // TODO: text型フィールドの場合に255文字以内決めうちでインデックス列のサイズとして 302 302 // 指定して良いか確認は必要。
Note: See TracChangeset
for help on using the changeset viewer.