Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
amostajo committed Feb 9, 2023
1 parent 711d77b commit ae7edc1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ Please read the [wiki](https://github.com/10quality/wp-query-builder/wiki) for d
Quick snippet sample:
```php
$books = wp_query_builder()
->select( 'ID' )
->select( 'post_name AS name' )
->select( 'ID' )
->select( 'post_name AS name' )
->from( 'posts' )
->where( ['post_type' => 'book'] )
->get();

foreach ($books as $book) {
echo $book->ID;
echo $book->name;
echo $book->ID;
echo $book->name;
}
```

Expand Down

0 comments on commit ae7edc1

Please sign in to comment.