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
Post a Comment