Skip to content

Commit e4694d4

Browse files
authored
Update smysql.php
1 parent 2ce9427 commit e4694d4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

smysql.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ public function get($table, $options = [], $flags = 4096) {
526526
$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)));
527527
else
528528
$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))
530530
$fetch = $fetch | self::FETCH_ARRAY;
531531
if(empty($options['cond_type']))
532532
$condtype = boolval($flags & self::COND_OR) ? self::COND_OR : self::COND_AND;
@@ -537,9 +537,9 @@ public function get($table, $options = [], $flags = 4096) {
537537
else
538538
$ordertype = $options['order_type'];
539539
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));
541541
else
542-
$ordertype = $options['join_type'];
542+
$jointype = $options['join_type'];
543543
if($flags & self::FETCH_OBJECT)
544544
$flags-= self::FETCH_OBJECT;
545545
if($flags & self::FETCH_ARRAY)
@@ -571,13 +571,13 @@ public function get($table, $options = [], $flags = 4096) {
571571
$order = empty($options['order']) ? "" : $options['order'];
572572
$limit = empty($options['limit']) ? NULL : $options['limit'];
573573
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");
575575
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");
577577
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");
579579
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");
581581
return $this->fetch($flags | $fetch);
582582
}
583583

0 commit comments

Comments
 (0)