1
collection « livres »:contrôle MongoDB existe dans le tableau
array (
'_id' => new MongoId("4e242b0ea5bb1bb00b000000"),
'book' =>
array (
'0' => 1,
'1' => 2,
'2' => 3,
'3' => 14,
'4' => 15,
),
'book_count' => 5,
'user_name' => 'john',
)
Comment puis-je vérifier où « un livre » dans un tableau « livre »?
est ce seul moyen de vérifier?
db.books.count({user_name:'john', book:1})