@@ -140,12 +140,12 @@ discard block |
||
140 | 140 | |
141 | 141 | // Define the query key |
142 | 142 | if (is_array($arKey2) && count($arKey2) > 0) { |
143 | - $key2 = ":" . md5(json_encode($arKey2)); |
|
143 | + $key2 = ":".md5(json_encode($arKey2)); |
|
144 | 144 | } else { |
145 | 145 | $key2 = ""; |
146 | 146 | } |
147 | 147 | |
148 | - return "qry:" . $key1 . $key2; |
|
148 | + return "qry:".$key1.$key2; |
|
149 | 149 | } |
150 | 150 | |
151 | 151 | public function getScalar($sql, $array = null) |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | public function getDbFunctions() |
229 | 229 | { |
230 | 230 | if (is_null($this->_dbFunction)) { |
231 | - $dbFunc = "\\ByJG\\AnyDataset\\Database\\DB" . ucfirst($this->_connectionManagement->getDriver()) . "Functions"; |
|
231 | + $dbFunc = "\\ByJG\\AnyDataset\\Database\\DB".ucfirst($this->_connectionManagement->getDriver())."Functions"; |
|
232 | 232 | $this->_dbFunction = new $dbFunc(); |
233 | 233 | } |
234 | 234 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | function limit($sql, $start, $qty) |
24 | 24 | { |
25 | 25 | if (strpos($sql, ' LIMIT ') === false) { |
26 | - return $sql . " LIMIT $start, $qty "; |
|
26 | + return $sql." LIMIT $start, $qty "; |
|
27 | 27 | } |
28 | 28 | |
29 | 29 | return $sql; |
@@ -56,8 +56,8 @@ discard block |
||
56 | 56 | if ($sql != "") { |
57 | 57 | $sql .= ", "; |
58 | 58 | } |
59 | - $sql .= " " . $this->_fieldDeliLeft . $fieldname . $this->_fieldDeliRight . " = " . $this->getValue($fieldname, |
|
60 | - $fieldvalue, $param, $decimalpoint) . " "; |
|
59 | + $sql .= " ".$this->_fieldDeliLeft.$fieldname.$this->_fieldDeliRight." = ".$this->getValue($fieldname, |
|
60 | + $fieldvalue, $param, $decimalpoint)." "; |
|
61 | 61 | } |
62 | 62 | $sql = "update $table set $sql where $filter "; |
63 | 63 | } elseif ($type == SQLType::SQL_INSERT) { |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | $campos .= ", "; |
69 | 69 | $valores .= ", "; |
70 | 70 | } |
71 | - $campos .= $this->_fieldDeliLeft . $fieldname . $this->_fieldDeliRight; |
|
71 | + $campos .= $this->_fieldDeliLeft.$fieldname.$this->_fieldDeliRight; |
|
72 | 72 | $valores .= $this->getValue($fieldname, $fieldvalue, $param, $decimalpoint); |
73 | 73 | } |
74 | 74 | $sql = "insert into $table ($campos) values ($valores)"; |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | */ |
93 | 93 | protected function getValue($name, $valores, &$param, $decimalpoint) |
94 | 94 | { |
95 | - $paramName = "[[" . $name . "]]"; |
|
95 | + $paramName = "[[".$name."]]"; |
|
96 | 96 | if (!is_array($valores)) { |
97 | 97 | $valores = array(SQLFieldType::TEXT, $valores); |
98 | 98 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | if (strlen($sql) > 4) { |
141 | 141 | $sql .= ' and '; |
142 | 142 | } |
143 | - $sql = " $fieldName " . $relation . " " . $this->getValue($fieldName, $value, $param, '.'); |
|
143 | + $sql = " $fieldName ".$relation." ".$this->getValue($fieldName, $value, $param, '.'); |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | public function setFieldDelimeters($left, $right) |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | function concat($s1, $s2 = null) |
11 | 11 | { |
12 | - return "concat(" . implode(func_get_args(), ', ') . ")"; |
|
12 | + return "concat(".implode(func_get_args(), ', ').")"; |
|
13 | 13 | } |
14 | 14 | |
15 | 15 | /** |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | function limit($sql, $start, $qty) |
23 | 23 | { |
24 | 24 | if (strpos($sql, ' LIMIT ') === false) { |
25 | - return $sql . " LIMIT $start, $qty "; |
|
25 | + return $sql." LIMIT $start, $qty "; |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | return $sql; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | function sqlDate($fmt, $col = false) |
68 | 68 | { |
69 | 69 | if (!$col) $col = 'now()'; |
70 | - $s = 'DATE_FORMAT(' . $col . ",'"; |
|
70 | + $s = 'DATE_FORMAT('.$col.",'"; |
|
71 | 71 | $concat = false; |
72 | 72 | $len = strlen($fmt); |
73 | 73 | for ($i = 0; $i < $len; $i++) { |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | break; |
129 | 129 | } |
130 | 130 | } |
131 | - $s.="')"; |
|
131 | + $s .= "')"; |
|
132 | 132 | if ($concat) $s = "CONCAT($s)"; |
133 | 133 | return $s; |
134 | 134 | } |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | function limit($sql, $start, $qty) |
21 | 21 | { |
22 | 22 | if (strpos($sql, ' LIMIT ') === false) { |
23 | - return $sql . " LIMIT $qty OFFSET $start "; |
|
23 | + return $sql." LIMIT $qty OFFSET $start "; |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | return $sql; |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | function sqlDate($fmt, $col = false) |
66 | 66 | { |
67 | 67 | if (!$col) $col = 'current_timestamp'; |
68 | - $s = 'TO_CHAR(' . $col . ",'"; |
|
68 | + $s = 'TO_CHAR('.$col.",'"; |
|
69 | 69 | |
70 | 70 | $len = strlen($fmt); |
71 | 71 | for ($i = 0; $i < $len; $i++) { |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | break; |
94 | 94 | |
95 | 95 | case 'H': |
96 | - $s.= 'HH24'; |
|
96 | + $s .= 'HH24'; |
|
97 | 97 | break; |
98 | 98 | |
99 | 99 | case 'h': |
@@ -122,11 +122,11 @@ discard block |
||
122 | 122 | if (strpos('-/.:;, ', $ch) !== false) { |
123 | 123 | $s .= $ch; |
124 | 124 | } else { |
125 | - $s .= '"' . $ch . '"'; |
|
125 | + $s .= '"'.$ch.'"'; |
|
126 | 126 | } |
127 | 127 | } |
128 | 128 | } |
129 | - return $s . "')"; |
|
129 | + return $s."')"; |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |