<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">Dear members,</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">I would like request you to help me the dynamic query problems. I created map file to show the point for one day on map. Because the table in PostGIS has many rows for many different days. I tested with FILTER but it is not the one I want. I tried to make criteria in DATA by WHERE clause. Please see map file here.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">This part make errors in map file. Other part is ok.</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">LAYER #Confidence<BR> CONNECTIONTYPE postgis<BR> NAME "firepoint"<BR> CONNECTION "user=postgres password=kyawsannoo1234 dbname=hotspot_db host=localhost port=5432"<BR># DATA "the_geom from firepoint"<BR> DATA "the_geom FROM (SELECT hotspot_tmp.the_geom as the_geom,hotspot_tmp.gid as oid,hotspot_tmp.date as date <BR> FROM hotspot_tmp WHERE hotspot_tmp.date='2006-08-15')"<BR># FILTER "f_posibl >=75"<BR># HEADER '/ms4w/projects/hotspot/htdocs/templates/HFVS_header.html'<BR># FOOTER '/ms4w/projects/hotspot/htdocs/templates/HFVS_footer.html'<BR> TOLERANCE 3<BR> STATUS ON<BR> TYPE POINT<BR> CLASSITEM "f_posibl"<BR> TEMPLATE '/ms4w/projects/hotspot/htdocs/templates/HFVS.html'<BR> CLASS<BR> NAME "Low [0-40]"<BR> EXPRESSION ([f_posibl] <= 40)<BR>
STYLE<BR> COLOR 255 255 0 <BR> SYMBOL "square"<BR> OUTLINECOLOR 0 0 0<BR> SIZE 5<BR> END<BR> END<BR> CLASS<BR> NAME "Moderate [41 - 70]"<BR> EXPRESSION (([f_posibl] > 40) and ([f_posibl] <= 70))<BR> STYLE<BR> COLOR 255 155 55 <BR> SYMBOL "square"<BR> OUTLINECOLOR 0 0 0<BR> SIZE 5<BR> END <BR> END<BR> CLASS<BR> NAME "High [71-100]"<BR> EXPRESSION ([f_posibl] > 70)<BR> STYLE<BR> COLOR 255 0 0 <BR> SYMBOL "square"<BR>
OUTLINECOLOR 0 0 0<BR> SIZE 5<BR> END <BR> END<BR>END<BR></DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">==============</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">ERRORS make</DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif"> </DIV>
<DIV style="FONT-SIZE: 10pt; FONT-FAMILY: arial, helvetica, sans-serif">msDrawMap(): Image handling error. Failed to draw layer named 'firepoint'. <BR>prepare_database(): Query error. Error executing POSTGIS DECLARE (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT f_posibl::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),OID::text from (SELECT hotspot_tmp.the_geom as the_geom,hotspot_tmp.gid as oid,hotspot_tmp.date as date FROM hotspot_tmp WHERE hotspot_tmp.date='2006-08-15') WHERE the_geom && setSRID('BOX3D(-15 -80,195 60)'::BOX3D, find_srid('','(SELECT hotspot_tmp.the_geom as the_geom,hotspot_tmp.gid as oid,hotspot_tmp.date as date FROM hotspot_tmp WHERE hotspot_tmp.date='2006-08-15')','the_geom') )' <BR><BR>Postgresql reports the error as 'ERROR: subquery in FROM must have an alias HINT: For example, FROM (SELECT ...) [AS] foo. '<BR><BR>More Help:<BR><BR>Error with POSTGIS data variable. You specified '<check your .map
file>'.<BR>Standard ways of specifiying are : <BR>(1) 'geometry_column from geometry_table' <BR>(2) 'geometry_column from (<sub query>) as foo using unique <column name> using SRID=<srid#>' <BR><BR>Make sure you put in the 'using unique <column name>' and 'using SRID=#' clauses in. <BR><BR>For more help, please see http://postgis.refractions.net/documentation/ <BR><BR>Mappostgis.c - version of Jan 23/2004. <BR>msPOSTGISLayerRetrievePK(): Query error. Error executing POSTGIS statement (msPOSTGISLayerRetrievePK():select attname from pg_attribute, pg_constraint, pg_class where pg_constraint.conrelid = pg_class.oid and pg_class.oid = pg_attribute.attrelid and pg_constraint.contype = 'p' and pg_constraint.conkey[1] = pg_attribute.attnum and pg_class.relname = '(SELECT hotspot_tmp.the_geom as the_geom,hotspot_tmp.gid as oid,hotspot_tmp.date as date FROM hotspot_tmp WHERE hotspot_tmp.date='2006-08-15')' and pg_constraint.conkey[2] is null <BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV></DIV></div><br>
<hr size=1>Now that's room service! <a href="http://travel.yahoo.com/hotelsearchpage;_ylc=X3oDMTFtaTIzNXVjBF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzIEc2VjA21haWx0YWdsaW5lBHNsawNxMS0wNw--
">Choose from over 150,000 hotels <br>in 45,000 destinations on Yahoo! Travel</a> to find your fit.</body></html>