Pop\Db\Adapter\Sqlite::numRows PHP 메소드

numRows() 공개 메소드

Return the number of rows in the result.
public numRows ( ) : integer
리턴 integer
    public function numRows()
    {
        if (null === $this->lastSql) {
            return $this->connection->changes();
        } else {
            if (!($this->lastResult = $this->connection->query($this->lastSql))) {
                $this->showError();
            } else {
                $num = 0;
                while (($row = $this->lastResult->fetcharray(SQLITE3_ASSOC)) != false) {
                    $num++;
                }
                return $num;
            }
        }
    }