|
|
@@ -717,19 +717,17 @@ 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[] = "
|
|
|
- create temporary table PROBLEMS_temp select * from PROBLEMS where ID_PROJECT < 1 ;
|
|
|
+ $sqlList[] = " create temporary table PROBLEMS_temp select * from PROBLEMS where ID_PROJECT < 1 ;";
|
|
|
|
|
|
- update PROBLEMS_temp as b
|
|
|
+ $sqlList[] = " update PROBLEMS_temp 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 ;
|
|
|
+ set b.ID_PROJECT=p.ID where b.ID_PROJECT<1 ;";
|
|
|
|
|
|
- update PROBLEMS_temp as b, PROBLEMS b1 set b1.ID_PROJECT=b.ID_PROJECT where b1.ID=b.ID;
|
|
|
+ $sqlList[] = " update PROBLEMS_temp as b, PROBLEMS b1 set b1.ID_PROJECT=b.ID_PROJECT where b1.ID=b.ID;
|
|
|
|
|
|
- drop table PROBLEMS_temp;
|
|
|
- ";
|
|
|
+ drop table PROBLEMS_temp; ";
|
|
|
|
|
|
|
|
|
}
|