php - How i can return specified fields in mongodb find() coursor? -


i try:

$fields = array('name'=>true); find (array(array(), $fields)) 

but it's not working (i nothing) , can't see mistake. sorry :(

the php function find not work that. try:

find(array(), array('name'=>1)) 

(basically omit surrounding array)

for reference here documentation page: http://php.net/manual/en/mongocollection.find.php


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -