Hello,

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:

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

$ret = @$msLayer->queryByAttributes($idAttribute, '"'.$query.'"', MS_MULTIPLE);

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.

Regards,
Dirk



just

Yves Jacolin wrote:
Oups sorry, here a quick translation:

  
BERANGER Patrick ask :
            
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.

  
Sylvain Beorchia replied:
          
Are you sure about :  from communes WHERE (gid = 'gid in ('182')') and ( ?
It would be :
from communes WHERE (gid in ('182')) and (

  
Then I (Yves Jacolin) wrote :
        
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.

  
Pierre GIRAUD wrote:
      
He clarified the release of mapserver which get this bug and propose to test 
its mapserver adding some parameter in the url:
http://.../cartoweb3/htdocs/client.php?id_recenter_layer=communes&id_recenter_ids=182

Y.
Le Jeudi 22 Février 2007 11:28, Alexandre Saunier a écrit :
  
Gentlemen,
may I remind you this is an english-writing mailing-list. ;)

Pierre GIRAUD wrote:
    
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 :

http://.../cartoweb3/htdocs/client.php?id_recenter_layer=communes&id_rece
nter_ids=182


Pierre

Yves Jacolin wrote:
      
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 :
        
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 :
          
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
            
_______________________________________________
Cartoweb-users mailing list
Cartoweb-users@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users
    

  
_______________________________________________
Cartoweb-users mailing list
Cartoweb-users@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users

Reply via email to