<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'><div style="text-align: left;">Hey, thx for the answer, but maybe I wasn't clear enought. I'm using ogr with a map file for a mapserver (an later on a GIS). My question is, is it possible to pass a parameter from the gis/wms call to the ogr query, passing by openlayer-ms4w then the map file. <br><br>Frank, you said I can use SetAttributeFilter, but how does it work ?<br><br>Thx for your help<br><br>Frédéric Therrien<br></div><br><br><br><hr id="stopSpelling">> Date: Mon, 22 Sep 2008 10:46:35 -0400<br>> From: warmerdam@pobox.com<br>> To: fredth@hotmail.com<br>> CC: gdal-dev@lists.osgeo.org<br>> Subject: Re: [gdal-dev] OGR dynamic query<br>> <br>> Frédéric Therrien wrote:<br>> > Hey guys, I'm using ogr to perform select statement in a database for a <br>> > mapserver/gis. I would like to know something. Is it possible to build <br>> > dynamic query ? Here is an example:<br>> > <br>> > Select * from Table where field1 > X<br>> > <br>> > Where X can vary depending on the query. I would like to use this <br>> > feature for time display (display information since a date and this date <br>> > can be feed by the user in the user interface).<br>> > <br>> > Thx for you help.<br>> <br>> Frédéric,<br>> <br>> I don't know anything about your application, but of course it is<br>> generally possible to do dynamic queries. This would normally be<br>> accomplished by assembling the query string dynamically in your<br>> application before passing it to ExecuteSQL() or SetAttributeFilter().<br>> <br>> Note that "OGR SQL" requires that the right side of any comparison be<br>> a constant, so you can't compare two fields in a non-database datasource<br>> (if that is what you were thinking). You can do anything supported by<br>> SQL in a real RDBMS.<br>> <br>> Best regards,<br>> -- <br>> ---------------------------------------+--------------------------------------<br>> I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com<br>> light and sound - activate the windows | http://pobox.com/~warmerdam<br>> and watch the world go round - Rush | Geospatial Programmer for Rent<br>> <br></body>
</html>