Answer the question
In order to leave comments, you need to log in
What is the correct way to use $push in PHP in MongoDB?
Data:
{
"Key" : $key,
"BlueGroup" : {
"1469132000" : {
"X" : 1.2,
"Y" : 3.3,
"Z" : 2.1
}
},
"ManyGroups" : { * }
}
$collection -> update(
array( 'key' => $key ),
array( '$push' => array(
'BlueGroup' => array(
time() => array(
'X' => $i->X,
'Y' => $i->Y,
'Z' => $i->Z
)
)
)
)
);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question