@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | foreach ($dataSet as $k => $data) { |
| 65 | 65 | $data = $this->parseData($query, $data, $allowFields, $bind); |
| 66 | 66 | |
| 67 | - $values[] = '( ' . implode(',', array_values($data)) . ' )'; |
|
| 67 | + $values[] = '( '.implode(',', array_values($data)).' )'; |
|
| 68 | 68 | |
| 69 | 69 | if (!isset($insertFields)) { |
| 70 | 70 | $insertFields = array_keys($data); |
@@ -104,7 +104,7 @@ discard block |
||
| 104 | 104 | $value = $value->getValue(); |
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - return $key . ' ' . $exp . ' ' . $value; |
|
| 107 | + return $key.' '.$exp.' '.$value; |
|
| 108 | 108 | } |
| 109 | 109 | |
| 110 | 110 | /** |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | // JSON字段支持 |
| 130 | 130 | list($field, $name) = explode('->', $key, 2); |
| 131 | 131 | |
| 132 | - return 'json_extract(' . $this->parseKey($query, $field, true) . ', \'$' . (strpos($name, '[') === 0 ? '' : '.') . str_replace('->', '.', $name) . '\')'; |
|
| 132 | + return 'json_extract('.$this->parseKey($query, $field, true).', \'$'.(strpos($name, '[') === 0 ? '' : '.').str_replace('->', '.', $name).'\')'; |
|
| 133 | 133 | } elseif (strpos($key, '.') && !preg_match('/[,\'\"\(\)`\s]/', $key)) { |
| 134 | 134 | list($table, $key) = explode('.', $key, 2); |
| 135 | 135 | |
@@ -146,11 +146,11 @@ discard block |
||
| 146 | 146 | } |
| 147 | 147 | |
| 148 | 148 | if ($strict && !preg_match('/^[\w\.\*]+$/', $key)) { |
| 149 | - throw new Exception('not support data:' . $key); |
|
| 149 | + throw new Exception('not support data:'.$key); |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | if ('*' != $key && !preg_match('/[,\'\"\*\(\)`.\s]/', $key)) { |
| 153 | - $key = '`' . $key . '`'; |
|
| 153 | + $key = '`'.$key.'`'; |
|
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | if (isset($table)) { |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $table = str_replace('.', '`.`', $table); |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | - $key = '`' . $table . '`.' . $key; |
|
| 161 | + $key = '`'.$table.'`.'.$key; |
|
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | return $key; |