Skip to content

Commit

Permalink
update imbricated DQL example
Browse files Browse the repository at this point in the history
  • Loading branch information
h2lsoft committed Apr 29, 2020
1 parent d5c9676 commit 1687633
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ $sql = $DBM->select("Name, SurfaceArea")
->orderBy('SurfaceArea DESC')
->limit(3)
->getSQL();
$results = $DBM->query($sql, [':Continent' => 'Asia'])->fetchAll();

// or imbricated version
$results = $DBM->select("Name, SurfaceArea")
->from('Country')
->where("Continent = :Continent")
->orderBy('SurfaceArea DESC')
->limit(3)
->executeSql([':Continent' => 'Asia'])
->fetchAll();


// insert
$values = [];
Expand Down

0 comments on commit 1687633

Please sign in to comment.