<slide>
<title>Querying: $gte</title>

<div effect="fade-out">
<example><![CDATA[<?php
$m = new MongoClient;
$c = $m->demo->cities;
$c->insert( [ "name" => "Buenos Aires", "population" => 13076300 ] );
$c->insert( [ "name" => "Dhaka", "population" => 10356500 ] );
$c->insert( [ "name" => "São Paulo", "population" => 10021295 ] );
$c->insert( [ "name" => "Shanghai", "population" => 14608512 ] );
$c->insert( [ "name" => "Delhi", "population" => 10927986 ] );
$c->insert( [ "name" => "Mumbai", "population" => 12691836 ] );
$c->insert( [ "name" => "Seoul", "population" => 10349312 ] );
$c->insert( [ "name" => "Mexico City", "population" => 12294193 ] );
?>]]></example>
</div>

<blurb>Find cities with more than 12 million inhabitants.</blurb>

<div effect="fade-in">
<example result="1"><![CDATA[<?php
$m = new MongoClient;
$c = $m->demo->cities;

$r = $c->find(
  // query
  [ 'population' => [ '$gte' => 12000000 ] ],
  // projection
  [ 'name' => 1, 'population' => 1, '_id' => 0 ]
);

foreach( $r as $res )
{
	echo $res['name'], ': ', $res['population'], "\n";
}]]></example>
</div>
</slide>
