@@ -803,7 +803,7 @@ public function find(Query $query)
803803
804804 $ bind = $ query ->getBind ();
805805
806- if ($ options ['fetch_sql ' ]) {
806+ if (! empty ( $ options ['fetch_sql ' ]) ) {
807807 // 获取实际执行的SQL语句
808808 return $ this ->getRealSql ($ sql , $ bind );
809809 }
@@ -882,7 +882,7 @@ public function select(Query $query)
882882
883883 $ bind = $ query ->getBind ();
884884
885- if ($ options ['fetch_sql ' ]) {
885+ if (! empty ( $ options ['fetch_sql ' ]) ) {
886886 // 获取实际执行的SQL语句
887887 return $ this ->getRealSql ($ sql , $ bind );
888888 }
@@ -926,7 +926,7 @@ public function insert(Query $query, $replace = false, $getLastInsID = false, $s
926926
927927 $ bind = $ query ->getBind ();
928928
929- if ($ options ['fetch_sql ' ]) {
929+ if (! empty ( $ options ['fetch_sql ' ]) ) {
930930 // 获取实际执行的SQL语句
931931 return $ this ->getRealSql ($ sql , $ bind );
932932 }
@@ -988,7 +988,7 @@ public function insertAll(Query $query, $dataSet = [], $replace = false, $limit
988988
989989 $ bind = $ query ->getBind ();
990990
991- if ($ options ['fetch_sql ' ]) {
991+ if (! empty ( $ options ['fetch_sql ' ]) ) {
992992 // 获取实际执行的SQL语句
993993 return $ this ->getRealSql ($ sql , $ bind );
994994 } elseif (is_array ($ sql )) {
@@ -1021,7 +1021,7 @@ public function selectInsert(Query $query, $fields, $table)
10211021
10221022 $ bind = $ query ->getBind ();
10231023
1024- if ($ options ['fetch_sql ' ]) {
1024+ if (! empty ( $ options ['fetch_sql ' ]) ) {
10251025 // 获取实际执行的SQL语句
10261026 return $ this ->getRealSql ($ sql , $ bind );
10271027 } else {
@@ -1088,7 +1088,7 @@ public function update(Query $query)
10881088 $ sql = $ this ->builder ->update ($ query );
10891089 $ bind = $ query ->getBind ();
10901090
1091- if ($ options ['fetch_sql ' ]) {
1091+ if (! empty ( $ options ['fetch_sql ' ]) ) {
10921092 // 获取实际执行的SQL语句
10931093 return $ this ->getRealSql ($ sql , $ bind );
10941094 } else {
@@ -1150,7 +1150,7 @@ public function delete(Query $query)
11501150
11511151 $ bind = $ query ->getBind ();
11521152
1153- if ($ options ['fetch_sql ' ]) {
1153+ if (! empty ( $ options ['fetch_sql ' ]) ) {
11541154 // 获取实际执行的SQL语句
11551155 return $ this ->getRealSql ($ sql , $ bind );
11561156 }
@@ -1217,7 +1217,7 @@ public function value(Query $query, $field, $default = null)
12171217
12181218 $ bind = $ query ->getBind ();
12191219
1220- if ($ options ['fetch_sql ' ]) {
1220+ if (! empty ( $ options ['fetch_sql ' ]) ) {
12211221 // 获取实际执行的SQL语句
12221222 return $ this ->getRealSql ($ sql , $ bind );
12231223 }
@@ -1285,7 +1285,7 @@ public function column(Query $query, $field, $key = '')
12851285
12861286 $ bind = $ query ->getBind ();
12871287
1288- if ($ options ['fetch_sql ' ]) {
1288+ if (! empty ( $ options ['fetch_sql ' ]) ) {
12891289 // 获取实际执行的SQL语句
12901290 return $ this ->getRealSql ($ sql , $ bind );
12911291 }
@@ -1349,7 +1349,7 @@ public function pdo(Query $query)
13491349
13501350 $ bind = $ query ->getBind ();
13511351
1352- if ($ options ['fetch_sql ' ]) {
1352+ if (! empty ( $ options ['fetch_sql ' ]) ) {
13531353 // 获取实际执行的SQL语句
13541354 return $ this ->getRealSql ($ sql , $ bind );
13551355 }
0 commit comments