|
|
@@ -19,6 +19,10 @@ function STATYSTYKA_TABELE() {
|
|
|
if (!$db) {
|
|
|
echo '<div class="alert alert-danger">' . "Database Error" . '</div>';
|
|
|
return;
|
|
|
+
|
|
|
+// $cmd[]['rsh']='mysql -h127.0.0.1 -uroot -p\''.$ADMIN_USERNAME_PASSWD.'\' -D'.$REMOTE_FOLDER_ROOT.' -e "REPLACE INTO \\`CRM_CONFIG\\` (\\`CONF_KEY\\`,\\`CONF_VAL\\`) VALUES (\'module_WMS\',\'on\')"';
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
|
|
|
$sqlList = array();
|
|
|
@@ -664,6 +668,7 @@ function STATYSTYKA_TABELE() {
|
|
|
,' ;<br> ' )) from IN7_MK_BAZA_DYSTRYBUCJI t2
|
|
|
where t2.path like concat('%-',t1.ID_PROJECT) or t2.path like concat('%-',t1.ID_PROJECT ,'-%')
|
|
|
);";
|
|
|
+ $sqlList[]="UPDATE MK_Rewiry t1, IN7_MK_BAZA_DYSTRYBUCJI t2 set t1.`ID_PROJECT_path`=t2.`path` where t1.ID_PROJECT=t2.ID";
|
|
|
|
|
|
$sqlList[]="UPDATE MK_Rewiry t1 set t1.`TASKS_INFO_trigger` = (
|
|
|
select group_concat( concat( t2.ID , ' p:', t2.`ID_PROJECT`,' ', t2.`A_STATUS`,' d:',date(t2.`L_APPOITMENT_DATE`) ,' u:', t2.`L_APPOITMENT_USER`
|
|
|
@@ -771,6 +776,13 @@ function STATYSTYKA_TABELE() {
|
|
|
) as p on ST_Intersects(p.the_geom,b.the_geom)
|
|
|
set b.ID_PROJECT=p.ID where b.ID_PROJECT<1 " ; //zrobic update BUILDINGS do ID_PROJECT na podstawie the_geom najmniejszegoi
|
|
|
|
|
|
+ $sqlList[] = "update MK_Rewiry as b
|
|
|
+ inner join (
|
|
|
+ select p.ID , p.the_geom from IN7_MK_BAZA_DYSTRYBUCJI as p group by p.ID order by ST_Area(p.the_geom)
|
|
|
+ ) as p on ST_Intersects(p.the_geom,b.the_geom)
|
|
|
+ set b.ID_PROJECT=p.ID where b.ID_PROJECT<1 " ; //zrobic update BUILDINGS do ID_PROJECT na podstawie the_geom najmniejszegoi
|
|
|
+
|
|
|
+
|
|
|
$sqlList[] = "update BADANIA_W_TERENIE as b
|
|
|
inner join (
|
|
|
select p.ID , p.the_geom from IN7_MK_BAZA_DYSTRYBUCJI as p group by p.ID order by ST_Area(p.the_geom)
|