db.parents.update(
{"$and": [
{
parent: "Ivan Ivanov"
},
{
"children.name": Vasya
"children.age": 23
"children.sex": "male"
}
]},
{
"children.sex": "female"
// тут, если не сработает, попробуйте полностью обьект заменить
}
)
db.getCollection('parents').update({"parent": "Ivan Ivanov", "children.age": 23}, {"$set": {"children.$.sex": "male"}})
<?
$get1 = mysql_query("SELECT * FROM notifications WHERE toag='".$_SESSION['agent_id']."' ORDER BY id DESC limit 100");
while($get = mysql_fetch_array($get1)){
if($get['author'] == '0'){
$author = 'Администрация';
}elseif($get['author'] == '1' or $get['author'] == '2' or $get['author'] == '3'){
$author = 'Разработчик';
}else{
$author = 'Спецагент #'.$get['author'];
}
$mess = ' '.$get['mess'];
$notifi = '<div class="notice_request_list" style="display: "><div id="notice_request_row_10000" class="notice_request_row">
<div class="notice_request_info_wrap clear_fix">
<a class="notice_image_link fl_l" href=""><img class="notice_request_img" src="/img/admin_avatar.png"></a>
<div class="notice_request_info fl_l">
<a class="mem_link">'.$author.':</a>'.$mess.'<div class="notice_request_buttons clear_fix">
<a class="fl_l" href="#"><button class="flat_button button_small">Прочитал</button></a> </div>
</div> </div>
</div>
</div>';
echo $notifi;
}
?>
var images = {"1": "/img/1.jpg", "2": "/img/2.jpg", "3": "/img/3.jpg", ":": "/img/splitter.jpg"};
"12:23".split('').map((item) => {
return "<img src='" + images[item] + "'>"
}).join('')
//"<img src='/img/1.jpg'><img src='/img/2.jpg'><img src='/img/splitter.jpg'><img src='/img/2.jpg'><img src='/img/3.jpg'>"