File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -144,13 +144,17 @@ private function compileBindings($query, $bindings)
144144 $ arrTables = $ arrTables [1 ];
145145
146146 $ ind = 0 ;
147- if (count ($ arrTables ) == 1 ){
147+ $ numTables = count ($ arrTables );
148+
149+ if ($ numTables == 1 ){
148150 $ table = $ arrTables [0 ];
149151 }
150-
152+
151153 foreach ($ arrQuery as $ key =>$ campos ){
152- if (in_array ($ campos , $ arrTables ) || (count ($ arrTables ) == 1 && isset ($ table ) && $ key == 0 )){
153- if (count ($ arrTables ) > 1 ){
154+ $ itsTable = in_array ($ campos , $ arrTables );
155+
156+ if ($ itsTable || ($ numTables == 1 && isset ($ table ) && $ key == 0 )){
157+ if ($ numTables > 1 ){
154158 $ table = $ campos ;
155159 }
156160 if (!array_key_exists ($ table , $ new_format )){
@@ -164,7 +168,7 @@ private function compileBindings($query, $bindings)
164168 }
165169 }
166170
167- if (!in_array ( $ campos , $ arrTables ) ){
171+ if (!$ itsTable ){
168172 if (count ($ bindings )>$ ind ){
169173 array_push ($ new_format [$ table ], ['campo ' => $ campos , 'binding ' => $ ind ]);
170174 if (in_array (strtolower ($ types [$ table ][$ campos ]['type ' ]), $ this ->without_quotes )){
You can’t perform that action at this time.
0 commit comments