ajax.load('some_url', {}, function() {maps.parseData(this);})
maps.parseData=function(ajaxData)
{
//предположим у меня нет спец механизма для обмена json
var myMapData=JSON.parse(ajaxData.answer);
for (var i=0, l=myMapData.length; i<l; i++)
{
maps.addPoint(myMap, myMapsData[i]);
}
}
maps.addPoint=function(mapObject, dataObject)
{
var=myPlacemark=new ymaps.Placemark([dataObject.long, dataObject.lat], {
balloonContent: 'цвет <strong>воды пляжа бонди</strong>'
}, {
iconLayout: 'default#image',
iconImageHref: '3.png',
iconImageSize: [45, 57]
}))
mapObject,.geoObjects.add(myPlacemark);
}
select sum(mt.order_sum) as month_sum,
count(*) as month_cnt,
ifnull(dt.day_cnt,0) as day_cnt,
ifnull(dt.day_sum,0) as day_sum,
mt.manager_lastname,
mt.manager_id
from ma_client_orders as mt
left join (select sum(order_sum) as day_sum,
count(*) as day_cnt,
manager_lastname
from ma_client_orders
where is_deleted=false and
order_date=curdate()
group by manager_lastname) as dt
on mt.manager_lastname=dt.manager_lastname
where is_deleted=false and
order_date>curdate() - interval dayofmonth(curdate()) day
group by manager_lastname
order by day_sum desc,month_sum desc
<input type="date">