Skip to content

Commit

Permalink
调整参数顺序
Browse files Browse the repository at this point in the history
  • Loading branch information
kiss291323003 committed Jan 28, 2022
1 parent 55af1f7 commit efed861
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/DbManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,14 @@ function __exec(MysqlClient $client,QueryBuilder $builder,bool $raw = false,?flo
$result = $client->execQueryBuilder($builder,$raw,$timeout);
if($this->onQuery){
$temp = clone $builder;
call_user_func($this->onQuery,$result,$temp,$client,$start);
call_user_func($this->onQuery,$result,$temp,$start,$client);
}
if(in_array('SQL_CALC_FOUND_ROWS',$builder->getLastQueryOptions())){
$temp = new QueryBuilder();
$temp->raw('SELECT FOUND_ROWS() as count');
$count = $client->execQueryBuilder($temp,false,$timeout);
if($this->onQuery){
call_user_func($this->onQuery,$count,$temp,$client,$start);
call_user_func($this->onQuery,$count,$temp,$start,$client);
}
$result->setTotalCount($count->getResult()[0]['count']);
}
Expand Down

0 comments on commit efed861

Please sign in to comment.