= MongoDB =

== Query by data type ==

Select all documents in the inventory collection where the price field value is a Double.

{{{#!highlight javascript
db.inventory.find( { price: { $type : 1 } } )
}}}

Select all documents in the inventory collection where the datex field value is a Date.

{{{#!highlight javascript
db.inventory.find( { datex: { $type : 9 } } )
}}}


== Data types ==

||Type||Number||
||Double||1||
||String||2||
||Object||3||
||Array||4||
||Binary data||5||
||Undefined (deprecated)||6||
||Object id||7||
||Boolean||8||
||Date||9||
||Null||10||
||Regular Expression||11||
||JavaScript||13||
||Symbol||14||
||JavaScript (with scope)||15||
||32-bit integer||16||
||Timestamp||17||
||64-bit integer||18||
||Min key||255||
||Max key ||127||

== PHP driver ==
=== Manual install ===
 * cd /tmp
 * wget http://pecl.php.net/get/mongo-1.4.3.tgz
 * tar xvzf mongo-1.4.3.tgz
 * yum install php-devel #on CentOS
 * phpize
 * ./configure
 * make
 * make install
 * add '''extension=mongo.so''' to /etc/php.ini
 * In CentOS 64 bit the '''mongo.so''' should be located in /usr/lib64/php/modules/mongo.so