This commit is contained in:
2024-04-26 15:28:40 +08:00
parent c100190155
commit 2fd37f90a3
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -99,6 +99,8 @@ class Command extends Component
$prepare->execute($this->params);
$prepare->fetch();
$count = $prepare->rowCount();
$prepare->closeCursor();
+1 -1
View File
@@ -235,7 +235,7 @@ class SqlBuilder extends Component
*/
public function count(): string
{
return $this->makeSelect(['0']) . $this->make();
return $this->makeSelect(['COUNT(*)']) . $this->make();
}