Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Joyboo committed Jun 4, 2023
2 parents c63bf6c + 35bb56f commit 17ef5c5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Common/Classes/Mysqli.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ public function insertAll($tableName, $data = [])
*/
public function fetch(QueryBuilder $Builder, string $modelName = '')
{
$this->config->setFetchMode(true);
// 如果之前非fetch模式,使用新配置重新创建链接
if ( ! $this->config->isFetchMode()) {
$this->config->setFetchMode(true);
$this->close();
}

$this->connect();
/** @var Cursor $Cursor */
Expand Down

0 comments on commit 17ef5c5

Please sign in to comment.