Skip to content

Commit

Permalink
Merge pull request #14 from skipperbent/v3-development
Browse files Browse the repository at this point in the history
Version 3.2.3
  • Loading branch information
skipperbent authored Sep 1, 2017
2 parents 3d0a8de + 4db4048 commit 460be50
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ $config = array(
),
);

$qb = new \Pecee\Pixie\Connection('mysql', $config);
$qb = (new \Pecee\Pixie\Connection('mysql', $config))->getQueryBuilder();
```

**Simple Query:**
Expand Down Expand Up @@ -158,7 +158,7 @@ $config = array(
'prefix' => 'cb_', // Table prefix, optional
);

$qb = new \Pecee\Pixie\Connection('mysql', $config);
$qb = (new \Pecee\Pixie\Connection('mysql', $config))->getQueryBuilder();

// Run query
$query = $qb->table('my_table')->where('name', '=', 'Sana');
Expand Down
2 changes: 1 addition & 1 deletion src/Pecee/Pixie/QueryBuilder/QueryBuilderHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function first()
$this->limit(1);
$result = $this->get();

return null === $result ? null : $result[0];
return empty($result) ? null : $result[0];
}

/**
Expand Down

0 comments on commit 460be50

Please sign in to comment.