Thank for your answer but the problem seems to be due to string quoting. If I don't write the quote, the result is an error about the column Paris which don't exist (normal). So I can't write quote but I need them ! Python seems not accept the escape \ character.
Y. Le Mardi 13 Février 2007 23:02, vous avez écrit : > Yves, > > I recently started using mapscript in a java environment. I got > the queryByAttributes working by changing the where clause. > > String cColumn= "ville"; > String cTmp= "Paris"; > String cWhere= "/"+cTmp.trim()+"/"; > objLayers.queryByAttributes(myMap, cColumn, cWhere, > mapscript.MS_SINGLE) > > This workes in my application. I am using version 4.10.0. > So, may be you can test removing 'ville=' > > Hans Wapenaar > GIS Innovations > The Netherlands > [EMAIL PROTECTED] > > ----- Original Message ----- > From: "Yves Jacolin" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Tuesday, February 13, 2007 4:17 PM > Subject: [UMN_MAPSERVER-USERS] [Python] queryByAttributes() > > > Hi, > > > > I am trying to create a map using a python script. I got a > > problem with the > > > getByAttributes() method : > > myLayer.queryByAttributes(mapobject,"ville","ville=Paris",1) > > > > The "Paris" string is viewed as a column name, and I can't > > change this, I > > > tried to used double and simple quote (" and '), tired to escape > > quote (\" > > > and \'), but all this failed ! > > > > Thanks, > > > > Y. > > PS : I am a newby to python and use mapscript 4.10.0 > > -- > > Yves Jacolin > > --- > > http://yjacolin.gloobe.org -- Yves Jacolin --- http://yjacolin.gloobe.org
