@@ -526,7 +526,7 @@ public function get($table, $options = [], $flags = 4096) {
526
526
$ fetch = boolval ($ flags & self ::FETCH_SMART ) ? self ::FETCH_SMART : (boolval ($ flags & self ::FETCH_ALL ) ? self ::FETCH_ALL : (boolval ($ flags & self ::FETCH_ARRAY ) ? self ::FETCH_ARRAY : (boolval ($ flags & self ::FETCH_OBJECT ) ? self ::FETCH_OBJECT : self ::FETCH_SMART )));
527
527
else
528
528
$ fetch = $ options ['fetch ' ];
529
- if (($ fetch ==self ::FETCH_ALL || $ fetch ==self ::FETCH_SMART ) && boolval ($ options [ ' fetch ' ] & self ::FETCH_ARRAY ))
529
+ if (($ fetch ==self ::FETCH_ALL || $ fetch ==self ::FETCH_SMART ) && boolval ($ flags & self ::FETCH_ARRAY ))
530
530
$ fetch = $ fetch | self ::FETCH_ARRAY ;
531
531
if (empty ($ options ['cond_type ' ]))
532
532
$ condtype = boolval ($ flags & self ::COND_OR ) ? self ::COND_OR : self ::COND_AND ;
@@ -537,9 +537,9 @@ public function get($table, $options = [], $flags = 4096) {
537
537
else
538
538
$ ordertype = $ options ['order_type ' ];
539
539
if (empty ($ options ['join_type ' ]))
540
- $ ordertype = boolval ($ flags & self ::JOIN_FULL ) ? self ::JOIN_FULL : (boolval ($ flags & self ::JOIN_RIGHT ) ? self ::JOIN_RIGHT : (boolval ($ flags & self ::JOIN_LEFT ) ? self ::JOIN_LEFT : self ::JOIN_INNER ));
540
+ $ jointype = boolval ($ flags & self ::JOIN_FULL ) ? self ::JOIN_FULL : (boolval ($ flags & self ::JOIN_RIGHT ) ? self ::JOIN_RIGHT : (boolval ($ flags & self ::JOIN_LEFT ) ? self ::JOIN_LEFT : self ::JOIN_INNER ));
541
541
else
542
- $ ordertype = $ options ['join_type ' ];
542
+ $ jointype = $ options ['join_type ' ];
543
543
if ($ flags & self ::FETCH_OBJECT )
544
544
$ flags -= self ::FETCH_OBJECT ;
545
545
if ($ flags & self ::FETCH_ARRAY )
@@ -571,13 +571,13 @@ public function get($table, $options = [], $flags = 4096) {
571
571
$ order = empty ($ options ['order ' ]) ? "" : $ options ['order ' ];
572
572
$ limit = empty ($ options ['limit ' ]) ? NULL : $ options ['limit ' ];
573
573
if (!$ cond && (!$ join || !$ on ))
574
- $ result = $ this ->select ($ table , $ order , $ cols , $ limit , $ flags | $ ordertype );
574
+ $ result = $ this ->select ($ table , $ order , $ cols , $ limit , $ flags | $ ordertype, " get " );
575
575
if ($ cond && (!$ join || !$ on ))
576
- $ result = $ this ->selectWhere ($ table , $ cond , $ order , $ cols , $ flags | $ condtype | $ ordertype );
576
+ $ result = $ this ->selectWhere ($ table , $ cond , $ order , $ cols , $ limit , $ flags | $ condtype | $ ordertype, " get " );
577
577
if (!$ cond && $ join )
578
- $ result = $ this ->selectJoin ($ table , $ join , $ on , $ order , $ cols , $ flags | $ jointype | $ ordertype );
578
+ $ result = $ this ->selectJoin ($ table , $ join , $ on , $ order , $ cols , $ limit , $ flags | $ jointype | $ ordertype, " get " );
579
579
if ($ cond && $ join )
580
- $ result = $ this ->selectJoinWhere ($ table , $ join , $ on , $ cond , $ order , $ cols , $ flags | $ jointype | $ condtype | $ ordertype );
580
+ $ result = $ this ->selectJoinWhere ($ table , $ join , $ on , $ cond , $ order , $ cols , $ limit , $ flags | $ jointype | $ condtype | $ ordertype, " get " );
581
581
return $ this ->fetch ($ flags | $ fetch );
582
582
}
583
583
0 commit comments