Skip to content

Commit

Permalink
More cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly authored Aug 15, 2018
1 parent c91397c commit bb252ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/dev/element-queries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ $entries = $query->all();
:::

::: warning
If you want to set the `orderBy` parameter like this, you must use the `['columnName' => SORT_ASC]` syntax rather than `'columnName asc'`.
If you want to set the `orderBy` parameter like this, you must use the `{'columnName': SORT_ASC}` syntax rather than `'columnName asc'`.
:::

### Param Value Syntax
Expand Down Expand Up @@ -126,7 +126,7 @@ For example, if you want to load entries with a custom `eventDate` field set wit
use craft\elements\Entry;
$start = new \DateTime('first day of next month')->format(\DateTime::ATOM);
$end = new \DateTime('last day of next month')->format(\DateTime::ATOM);
$end = new \DateTime('last day of next month')->format(\DateTime::ATOM);
$entries = Entry::find()
->section('events')
->eventDate(['and', ">= {$start}", "<= {$end}"])
Expand Down

0 comments on commit bb252ad

Please sign in to comment.