<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
just in case this has not been solved yet. I had a similar problem with
mapserver 4.10.0. According to the mapserver mailing list, there is
(was?) a bug in version 4.10.0 that created wrong WHERE clauses in the
queryByAttributes function. I use the following workaround:<br>
<br>
In corelugins\mapquery\server\ServerMapquery.php (around line 170) the
statement that retrieves the query results from mapserver has to be
extended by some quotes. It should look like<br>
<br>
<tt>$ret = @$msLayer->queryByAttributes($idAttribute,
'"'.$query.'"', MS_MULTIPLE);<br>
</tt><br>
This seems to work with mapserver 4.10.0 and PostGIS data sources.
Please be aware, that I do not know, if it also works with other
datasources or mapserver versions. Also, I do not know if this also
applies to your problem, because my Postgres error was slightly
different.<br>
<br>
Regards,<br>
Dirk<br>
<br>
<br>
<br>
just<br>
<br>
Yves Jacolin wrote:
<blockquote cite="mid:200702241642.01294.yjacolin@free.fr" type="cite">
<pre wrap="">Oups sorry, here a quick translation:
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">BERANGER Patrick ask :
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre wrap=""><!---->When using the Plugin "Locate", he get this errors :
Error in prepare_database(): Error executing POSTGIS DECLARE (the actual
query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
gid::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::text
from communes WHERE (gid = 'gid in ('182')') and (the_geom && setSRID(
'BOX3D(660000 2037903.1,876194
2189238.9)'::BOX3D,find_srid('','communes','the_geom') ))'
He wondered if he added too much quotes.
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">Sylvain Beorchia replied:
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre wrap=""><!---->Are you sure about : from communes WHERE (gid = 'gid in ('182')') and ( ?
It would be :
from communes WHERE (gid in ('182')) and (
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">Then I (Yves Jacolin) wrote :
</pre>
</blockquote>
</blockquote>
</blockquote>
<pre wrap=""><!---->Which release of mapserver do you use ? Because I spend a lot of time about a
bug on a mapserver 4.10 (or 4.8 don't reminder) which cause same error.
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">Pierre GIRAUD wrote:
</pre>
</blockquote>
</blockquote>
<pre wrap=""><!---->He clarified the release of mapserver which get this bug and propose to test
its mapserver adding some parameter in the url:
<a class="moz-txt-link-freetext" href="http://.../cartoweb3/htdocs/client.php?id_recenter_layer=communes&id_recenter_ids=182">http://.../cartoweb3/htdocs/client.php?id_recenter_layer=communes&id_recenter_ids=182</a>
Y.
Le Jeudi 22 Février 2007 11:28, Alexandre Saunier a écrit :
</pre>
<blockquote type="cite">
<pre wrap="">Gentlemen,
may I remind you this is an english-writing mailing-list. ;)
Pierre GIRAUD wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Bonjour,
Yves a en effet une bonne piste puisque il y avait un bug à peu près
similaire dans les versions 4.8.x de Mapserver qui avait été corrigé
dans la version 4.8.3.
Avez-vous testé le recentrage simple sur identifiant ? Vous pouvez
tester ça simplement en ajoutant les paramètres "id_recenter_layer" et
"id_recenter_ids" dans votre url en leur donnant les bonnes valeurs :
<a class="moz-txt-link-freetext" href="http://.../cartoweb3/htdocs/client.php?id_recenter_layer=communes&id_rece">http://.../cartoweb3/htdocs/client.php?id_recenter_layer=communes&id_rece</a>
nter_ids=182
Pierre
Yves Jacolin wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Bonjour,
À tout hasard, quelle version de mapserver utilisez vous ? la 4.10 ?
la 4.10.1 ?
Y.
Le Mercredi 21 Février 2007 17:42, Sylvain Beorchia a écrit :
</pre>
<blockquote type="cite">
<pre wrap="">Salut,
es tu sur de ta notation :
from communes WHERE (gid = 'gid in ('182')') and (
?
ne serait-ce pas plutotPlugin "Locate"
from communes WHERE (gid in ('182')) and (
BERANGER Patrick - DDE 69/PM/SIG a écrit :
</pre>
<blockquote type="cite">
<pre wrap="">Bonjour,
J'essaie en vain d'utiliser le Plugin "Locate" et là je craque. J'ai
cette erreur lorsque je selectionne le lieu désiré : Error in
prepare_database(): Error executing POSTGIS DECLARE (the actual query)
statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT
gid::text,asbinary(force_collection(force_2d(the_geom)),'NDR'),gid::te
xt
from communes WHERE (gid = 'gid in ('182')') and (the_geom && setSRID(
'BOX3D(660000 2037903.1,876194
2189238.9)'::BOX3D,find_srid('','communes','the_geom') ))'
Je crois comprendre que j'ai des " ' " en trop mais comment faire
pour les enlever ?
D'avance merci
</pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<pre wrap="">_______________________________________________
Cartoweb-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Cartoweb-users@lists.maptools.org">Cartoweb-users@lists.maptools.org</a>
<a class="moz-txt-link-freetext" href="http://lists.maptools.org/mailman/listinfo/cartoweb-users">http://lists.maptools.org/mailman/listinfo/cartoweb-users</a>
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
</body>
</html>