hi thanks  for your answer.<br>can you show an example in more details?<br><br><br><div class="gmail_quote">On Wed, Aug 10, 2011 at 11:17 PM, Charles Galpin <span dir="ltr">&lt;<a href="mailto:cgalpin@lhsw.com">cgalpin@lhsw.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Javad<br>
<br>
I use geoserver and it&#39;s &quot;sql view&quot; feature to do this.  I don&#39;t return the results in GeoJSON but I believe it can, but you can use a vector layer if you want the raw data to put into a store or do something interactive, or a wms layer if there are large results for better performance.<br>

<br>
The way it works is pretty much like you describe. In openlayers you define a layer with a filter and in your app you can let someone enter a street name say, and refresh the layer (using mergeNewParams).  The parameters get send to the geoserver sql view which you&#39;d have your select statement use the parameter value, and the layer results go back just like in a static layer.<br>

<br>
hth<br>
charles<br>
<div><div></div><div class="h5"><br>
On Aug 10, 2011, at 12:54 PM, javad sadidi wrote:<br>
<br>
&gt; hi to all.<br>
&gt;  I am working on pgrouting project.I am using OSM data to find the best route.<br>
&gt; but I want to take a query into postgresql by php server side and returen the result on the browser with GeoJSON format. for example I want bring the result of this query as selected streets on the browser by openlayers.<br>

&gt; select * from table where streetname is x or y;<br>
&gt; then bring the result by Geojson output to the browser,I would like to display these streets as red color in the browser for clients.<br>
&gt; who can help me?<br>
&gt; it the simplest example.<br>
&gt; danke<br>
</div></div>&gt; _______________________________________________<br>
&gt; Pgrouting-users mailing list<br>
&gt; <a href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br>
<br>
_______________________________________________<br>
Pgrouting-users mailing list<br>
<a href="mailto:Pgrouting-users@lists.osgeo.org">Pgrouting-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/pgrouting-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/pgrouting-users</a><br>
</blockquote></div><br>