Changeset 21441 for branches/version-2_12-dev/data/class/db
- Timestamp:
- 2012/02/06 11:05:15 (12 years ago)
- Location:
- branches/version-2_12-dev/data/class/db
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/db/SC_DB_DBFactory.php
r21420 r21441 67 67 */ 68 68 function getDSN($dsn = "") { 69 if (empty($dsn)) {70 if (defined('DEFAULT_DSN')) {69 if (empty($dsn)) { 70 if (defined('DEFAULT_DSN')) { 71 71 $dsn = DEFAULT_DSN; 72 72 } else { -
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 // 指定して良いか確認は必要。 -
branches/version-2_12-dev/data/class/db/dbfactory/SC_DB_DBFactory_PGSQL.php
r21420 r21441 136 136 */ 137 137 function getOrderTotalDaysWhereSql($type) { 138 switch ($type){138 switch ($type) { 139 139 case 'month': 140 140 $format = 'MM';
Note: See TracChangeset
for help on using the changeset viewer.