compared with
Version 8 by Valentin Golev
on Jan 06, 2010 09:41.

Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (3)

View Page History
{zone-data:use-cases}
{code}

$db = Zend_Nosql_Mongo_Db(null, 'testdb');
$coll = $db->getCollection('testcollection');
$q = $coll->ensureIndex('field')->query()->lowerThan('field', 10);
foreach ($q as $item) echo $item->fields, " must be lower than 10!\n";
{code}
{code}
$db = Zend_Nosql_Mongo_Db(null, 'testdb');
$coll = $db->getCollection('testcollection');
for ($i = 0; $i < 100; $i++) {
echo $coll->save(new Zend_Nosql_Mongo_Object(array('field' => $i))->getId(), " is another unique id\n";
}

$q = $coll->ensureIndex('field')->query()->lowerThan('field', 10);
foreach ($q as $item) echo $item->fields, " must be lower than 10!\n";

{code}
{zone-data}