Заппрос к слоям

Есть две связанных таблицы, в одной хранится графика, в друго-атрибутика.
Как в Mapserver сделать запрос к слою, чтобы он показал атрубутивную информацию?
Определение слоя в мапфайле

LAYER
 NAME 's_1'
 CONNECTIONTYPE postgis
 CONNECTION "user=postgres password=zzcz2com dbname=slave_1 host=localhost"
  DATA "the_geom from (
	select * from videl
	left join uolh on videl.id=uolh.id where uolh.vmr like 'С'
	) AS new_table using unique gid using srid=4326"
 STATUS DEFAULT
 TYPE POLYGON
  PROJECTION
   "init=epsg:4326"
  END
 CLASS
      OUTLINECOLOR 0 0 0
      COLOR 154 205 50
      TEMPLATE "templates/s_1.html"
 END
 HEADER "templates/s_1_header.html"
 FOOTER "templates/s_1_footer.html"
END

Запрос к слою

<input type="radio" name="mode" value="query"> <b>Запрос к слою</b><br>

Выдает ошибку
Content-type: text/html msPOSTGISLayerGetShape(): Query error. Error executing POSTGIS SQL statement (IN FETCH ALL): DECLARE mycursor2 BINARY CURSOR FOR SELECT "gid"::text,"id"::text,"fz"::text,"mk"::text,"kv"::text,"admr"::text,"sknr"::text,"pl"::text,"znam"::text,"zk"::text,"lesb"::text,"ukat"::text,
"skp"::text,"vmr"::text,"bon"::text,"mtip"::text,"dtg"::text,"akl"::text,"kfmr"::text,"tur1h"::text,"up"::text,"legend"::text,"id"::text,"MK"::text,
"KV"::text,"SKNR"::text,"PL"::text,"ZK"::text,"vmr"::text,"BON"::text,"MTIP"::text,"DTG"::text,"STUR"::text,"AKL"::text,"AGR"::text,
"ARD1"::text,"KF1"::text,"MR1"::text,"AMZ1"::text,"H1"::text,"D1"::text,"PSP1"::text,"SKAL1"::text,"TUR1"::text,"ARD2"::text,"KF2"::text,
"MR2"::text,"AMZ2"::text,"H2"::text,"D2"::text,"PSP2"::text,"SKAL2"::text,"TUR2"::text,"ARD3"::text,"KF3"::text,"MR3"::text,"AMZ3"::text,
"H3"::text,"D3"::text,"PSP3"::text,"SKAL3"::text,"TUR3"::text,"ARD4"::text,"KF4"::text,"MR4"::text,"AMZ4"::text,"H4"::text,"D4"::text,
"PSP4"::text,"SKAL4"::text,"TUR4"::text,"ARD5"::text,"KF5"::text,"MR5"::text,"AMZ5"::text,"H5"::text,"D5"::text,"PSP5"::text,"SKAL5"::text,
"TUR5"::text,"ARD6"::text,"KF6"::text,"MR6"::text,"AMZ6"::text,"H6"::text,"D6"::text,"PSP6"::text,"SKAL6"::text,"TUR6"::text,"ARD7"::text,
"KF7"::text,"MR7"::text,"AMZ7"::text,"H7"::text,"D7"::text,"PSP7"::text,"SKAL7"::text,"TUR7"::text,"ARD8"::text,"KF8"::text,"MR8"::text,
"AMZ8"::text,"H8"::text,"D8"::text,"PSP8"::text,"SKAL8"::text,"TUR8"::text,"ARD9"::text,"KF9"::text,"AMZ9"::text,"H9"::text,"D9"::text,
"PSP9"::text,"SKAL9"::text,"TUR9"::text,"ARD10"::text,"KF10"::text,"AMZ10"::text,"H10"::text,"D10"::text,"PSP10"::text,"SKAL10"::text,
"TUR10"::text,"KOL"::text,"H31"::text,"MR31"::text,"LEGEND"::text,asbinary(force_collection(force_2d(the_geom)),'NDR') FROM ( SELECT * FROM videl LEFT JOIN uolh ON videl.id=uolh.id WHERE uolh.vmr LIKE '' ) AS new_table WHERE gid = 193 -ERROR: COLUMN reference "id" IS ambiguous LINE 1: ...RE mycursor2 BINARY CURSOR FOR SELECT "gid"::text,"id"::text... ^ More Help:

Что неправильно?

Опции просмотра комментариев

Выберите предпочитаемый вами способ показа комментариев и нажмите "Сохранить настройки" для активации изменений.

Все спасибо

Все спасибо проблемма разрешилась =)

Опции просмотра комментариев

Выберите предпочитаемый вами способ показа комментариев и нажмите "Сохранить настройки" для активации изменений.

Back to top

(С) Виктор Вислобоков, 2008-2023