> For the complete documentation index, see [llms.txt](https://jls-organization-3.gitbook.io/projecthyper/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jls-organization-3.gitbook.io/projecthyper/features/quickstart/parameters/having.md).

# having

Filter records using having

{% hint style="info" %}
Using those additional parameters we need to adjust our `where` conditions
{% endhint %}

The adjustments are already introduced [here](/projecthyper/features/quickstart/parameters/where.md).

**Note:**

```php
// From
$condition = array('id' => 1);
// To
$condition = array(
    'where' => array(
        'id' => 1
    )
)
// We can also use the other conditions
$condition = array(
    'where' => array(
        'id' => array(
            'in' => array(1,2,3)
        )
    )
)
```

**Usage:**

Just add the `having` object in the root object

```php
$condition = array(
    'where' => array(
        'id' => array(
            'in' => array(1,2,3)
        )
    ),
    'order' => array(
        'id' => 'DESC'
    ),
    'group' => array(
        'id',
        'name'
    ),
    'having' => array(
        'id > 1',
        'id <= 5'
    )
)

$db->news->find($condition);
```
