Skip to content

Update select-data.md #469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,19 @@ $query
->from($db->quoteName('#__user_profiles'))
->setLimit('10');
```
:::warning[Developer Note]
By default, Joomla limits the number of items returned in list models to the value set in the "**Default List Limit**" configuration, which is typically **20**. This is controlled by the `list.limit` state in your model, usually set in the `populateState()` method.
To remove the limit and retrieve all rows (i.e., disable pagination), set the `list.limit` state to `0` **after** calling the parent populateState() method in your model. Here’s how you can do it:
```php
protected function populateState($ordering = 'word', $direction = 'ASC')
{
parent::populateState($ordering, $direction);

// Set limit to 0 to show all items
$this->setState('list.limit', 0);
}
```
:::

## Selecting Records from Multiple Tables

Expand Down