<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content=Word.Document>
<META content="Microsoft Word 9">
<META content="Microsoft Word 9"><!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:HyphenationZone>21</w:HyphenationZone> <w:DoNotOptimizeForBrowser/> </w:WordDocument> </xml><![endif]-->
<STYLE>@page Section1 {size: 612.0pt 792.0pt; margin: 70.85pt 70.85pt 70.85pt 70.85pt; mso-header-margin: 36.0pt; mso-footer-margin: 36.0pt; mso-paper-source: 0; }
P.MsoNormal {
        FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: Arial; mso-style-parent: ""; mso-pagination: widow-orphan; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"
}
LI.MsoNormal {
        FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: Arial; mso-style-parent: ""; mso-pagination: widow-orphan; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"
}
DIV.MsoNormal {
        FONT-SIZE: 10pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: Arial; mso-style-parent: ""; mso-pagination: widow-orphan; mso-bidi-font-size: 12.0pt; mso-fareast-font-family: "Times New Roman"; mso-bidi-font-family: "Times New Roman"
}
DIV.Section1 {
        page: Section1
}
</STYLE>
<META content="MSHTML 6.00.6000.16674" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hi</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>the edit plugin do not use the DATA string to generate the sql
for select/insert/update/delete, </FONT><FONT size=2>it use the various 'edit_*'
parameters.</FONT></DIV>
<DIV><FONT size=2>the sql itself is generated in file
ServerEdit.php.</FONT></DIV>
<DIV><FONT size=2>you need to extend the server part of the edit plugin if you
want to modify the way the sql is generated so you can get and modify the data
from different tables.</FONT></DIV>
<DIV><FONT size=2>see <A
href="http://www.cartoweb.org/doc_head/docbook/xhtml/dev.newplugin.html#dev.newplugin.adapting.extending">http://www.cartoweb.org/doc_head/docbook/xhtml/dev.newplugin.html#dev.newplugin.adapting.extending</A> (sound
complicated but it's fairly simple)</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>another possbility would be to use a postgres "view"
containing the aggregated data of the different tables. The only problem is
by default a "view" is readonly, though the postgres documentation say it is
possible to add "rules" on the "view" to generate the corresponding action on
the parent tables. </FONT></DIV>
<DIV><FONT size=2>I havent tried that myself.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>regards</FONT></DIV>
<DIV><FONT size=2>Oliver</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=chastagnol.claire@wanadoo.fr
href="mailto:chastagnol.claire@wanadoo.fr">Claire Chastagnol</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=cartoweb-users@lists.maptools.org
href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, August 05, 2008 2:48
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Cartoweb-users] edit plugin
edition of the attributes</DIV>
<DIV><BR></DIV>
<P
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"
align=left><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi,<BR><BR>I have
a little question on the edit plugin.<BR>My layer to edit is part of a
database. I would like to edit some attributes wich are part of other tables
(non geographic) while I'm editing my geographic layer.<BR>Is this
possible?<BR><BR>I tried with a query in the mapfile which join the
tables, but I can't edit the attributes which aren't in the table
corresponding to the layer I am editing.<BR><BR>This is my
mapfile:<BR>LAYER<BR> NAME
"evenements"<BR> TYPE POINT<BR> STATUS
ON<BR> TEMPLATE 'ttt'<BR> CONNECTIONTYPE
POSTGIS<BR> CONNECTION 'dbname=crises_route user=myuser
password=mypassword host=localhost'<BR> DATA "geo FROM
(SELECT geo,evenements.id_ev,type_ev FROM evenements JOIN type_ev ON
evenements.id_ev = type_ev.id_type_ev) as foo USING UNIQUE id_ev USING SRID =
27573" <BR> <BR>
CLASS<BR> NAME
"inondation"<BR>
STYLE<BR> COLOR 204 51
204<BR> END<BR>
<BR> END<BR>
<BR> METADATA<BR>
'id_attribute_string' 'evenements.id_ev'
<BR> 'query_returned_attributes'
'evenements.id_ev type_ev description'<BR>
'edit_table' 'evenements' # PostGIS
table<BR> 'edit_geometry_column' 'geo' #
PostGIS geometry column<BR>
'edit_geometry_type' 'point' # PostGIS geometry type<BR>
'edit_srid' '27573'<BR>
'edit_attributes'
'evenements.id_ev,type_ev|string,description|string' # list of the editable
<BR> <BR>
END<BR><BR> also tried the query:</SPAN><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> DATA "geo FROM (SELECT
geo,evenements.id_ev,type_ev FROM evenements, type_ev WHERE evenements.id_ev =
type_ev.id_type_ev) as foo USING UNIQUE id_ev USING SRID = 27573"<BR>But this
creates an error message which says:<BR></SPAN><PRE style="BORDER-RIGHT: 0pt; BORDER-TOP: 0pt; BORDER-LEFT: 0pt; BORDER-BOTTOM: 0pt">Postgresql reports the error as 'ERREUR: find_srid() - couldnt find the corresponding SRID - is the geometry registered in the GEOMETRY_COLUMNS table? Is there an uppercase/lowercase missmatch?<BR></PRE>But
my SRID is the same in my mapfile and my database!!!<BR><BR>Thank you for the
help.<BR>Claire<BR>
<P></P>
<P>
<HR>
<P></P>_______________________________________________<BR>Cartoweb-users
mailing
list<BR>Cartoweb-users@lists.maptools.org<BR>http://lists.maptools.org/mailman/listinfo/cartoweb-users<BR></BLOCKQUOTE></BODY></HTML>