# give/4.16.9/src/Framework/QueryBuilder/Concerns/OffsetStatement.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.16.9. 34 lines.

- Page: https://pluginprobe.com/plugins/give/4.16.9/code/src/Framework/QueryBuilder/Concerns/OffsetStatement.php
- Raw: https://pluginprobe.com/plugins/give/4.16.9/raw/src/Framework/QueryBuilder/Concerns/OffsetStatement.php
- Modified: 2022-02-25T01:33:58+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.16.9/code/src/Framework/QueryBuilder/Concerns/OffsetStatement.php#L10-L20`.

```php
<?php

namespace Give\Framework\QueryBuilder\Concerns;

/**
 * @since 2.19.0
 */
trait OffsetStatement
{
    /**
     * @var int
     */
    protected $offset;

    /**
     * @param  int  $offset
     *
     * @return $this
     */
    public function offset($offset)
    {
        $this->offset = (int)$offset;

        return $this;
    }

    protected function getOffsetSQL()
    {
        return $this->limit && $this->offset
            ? ["OFFSET {$this->offset}"]
            : [];
    }
}

```
