Dibi\Connection::getAffectedRows PHP Method

getAffectedRows() public method

Gets the number of affected rows by the last INSERT, UPDATE or DELETE query.
public getAffectedRows ( ) : integer
return integer number of rows
    public function getAffectedRows()
    {
        $this->connected || $this->connect();
        $rows = $this->driver->getAffectedRows();
        if (!is_int($rows) || $rows < 0) {
            throw new Exception('Cannot retrieve number of affected rows.');
        }
        return $rows;
    }