Skip to content

Commit

Permalink
fix fetchone
Browse files Browse the repository at this point in the history
  • Loading branch information
h2lsoft committed May 28, 2024
1 parent 742daee commit 63c6587
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/DBManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,9 @@ public function fetchObjectAll()
public function fetchOne()
{
if(!is_object($this->query_stack[$this->query_id]))return false;
return $this->query_stack[$this->query_id]->fetch(PDO::FETCH_NUM)[0];
$rec = $this->query_stack[$this->query_id]->fetch(PDO::FETCH_NUM);
if(!$rec)return false;
return $rec[0];
}

/**
Expand Down

0 comments on commit 63c6587

Please sign in to comment.