我在數據庫中有如下, ,我想找到與搜索詞此項目「打開」Mongo Query數組,當數組鍵未知?
應該差不多是這樣的,我想???
$query = array(array('keywords' => array('$in'=>'open'))); $cursor = $collection->find($query); return iterator_to_array($cursor);
在數據庫:
[3b33162ad4ed5ffdeb88a1b2085535b1] => Array
(
[_id] => 3b33162ad4ed5ffdeb88a1b2085535b1
[title] => Something
[keywords] => Array
(
[2] => open
[7] => source
)
[added] => MongoDate Object
(
[sec] => 1305884144
[usec] => 658000
)
)
問題是?問題是什麼?爲什麼嵌套數組(...)? – 2011-05-20 12:05:46