@@ -1021,12 +1021,10 @@ public function executeQuery(
10211021 }
10221022
10231023 $ stmt = $ connection ->prepare ($ sql );
1024- if (count ($ types ) > 0 ) {
1025- $ this ->_bindTypedValues ($ stmt , $ params , $ types );
1026- $ result = $ stmt ->execute ();
1027- } else {
1028- $ result = $ stmt ->execute ($ params );
1029- }
1024+
1025+ $ this ->bindParameters ($ stmt , $ params , $ types );
1026+
1027+ $ result = $ stmt ->execute ();
10301028 } else {
10311029 $ result = $ connection ->query ($ sql );
10321030 }
@@ -1128,15 +1126,10 @@ public function executeStatement($sql, array $params = [], array $types = [])
11281126
11291127 $ stmt = $ connection ->prepare ($ sql );
11301128
1131- if (count ($ types ) > 0 ) {
1132- $ this ->_bindTypedValues ($ stmt , $ params , $ types );
1133-
1134- $ result = $ stmt ->execute ();
1135- } else {
1136- $ result = $ stmt ->execute ($ params );
1137- }
1129+ $ this ->bindParameters ($ stmt , $ params , $ types );
11381130
1139- return $ result ->rowCount ();
1131+ return $ stmt ->execute ()
1132+ ->rowCount ();
11401133 }
11411134
11421135 return $ connection ->exec ($ sql );
@@ -1668,7 +1661,7 @@ public function convertToPHPValue($value, $type)
16681661 *
16691662 * @throws Exception
16701663 */
1671- private function _bindTypedValues (DriverStatement $ stmt , array $ params , array $ types ): void
1664+ private function bindParameters (DriverStatement $ stmt , array $ params , array $ types ): void
16721665 {
16731666 // Check whether parameters are positional or named. Mixing is not allowed.
16741667 if (is_int (key ($ params ))) {
0 commit comments