Skip to content
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

YORM-Doku: Beispiel für resetSelect() #1534

Open
wants to merge 1 commit into
base: master
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
10 changes: 5 additions & 5 deletions docs/04_yorm.md
Original file line number Diff line number Diff line change
Expand Up @@ -516,14 +516,14 @@ $query->whereListContains('my_column', [3, 5, 9]);

Beispiel für resetSelect()

// resetSelect() ermöglicht es im Anschluss per select nur die Felder des Datensatzes zu erhalten, die man wirklich benötigt.
// resetSelect() ermöglicht es im Anschluss bestehende SELECTS zurückzusetzen und nur die Felder des Datensatzes zu erhalten, die man wirklich benötigt.

```php
$dataset = rex_yform_manager_query::get('rex_yf_example')
->resetSelect()
->select('id')
->select('title')
->select('name')
->resetSelect() // Alle bisherigen SELECT-Definitionen werden entfernt.
->select('id') // *** id muss angegeben werden ***, da auch dieses default SELECT entfernt wurde
->select('title')
->select('name')
->findId($id);
```

Expand Down
Loading