hi, Try with this line please: query = query.replace(/%/g,'%25');
If it is OK for you I will correct it in pmapper. Thomas Le 10/07/2014 01:11, Pedro Venâncio a écrit : > Hi, > > I found something strange in QueryEditor plugin. By doing a search like this > > [nome_1] ILIKE '%pedro%' > OR > [nome_2] ILIKE '%campos%' > > it does not give the expected result of the second clause. It seems to me > that there may be a bug. > > The query POST is (firebug): > > &operation=query&layername=tipo&layerType=shape&query=[nome_1] ILIKE > '%25pedro%' OR [nome_2] ILIKE '%campos%' > > and the pm_debug.log: > > [09-Jul-2014 23:17:25] P.MAPPER debug info > Parameters for REQUEST array > file: query.php->q_execAttributeQuery > > Array > ( > [operation] => query > [layername] => tipo > [layerType] => postgis > [query] => [nome_1] ILIKE '%pedro%' > OR > [nome_2] ILIKE 'Êmpos%' > [externalSearchDefinition] => 1 > [mode] => search > [layerName] => tipo > [firstFld] => nome_1 > [qStr] => nome_1 ~* 'pedro' OR nome_2 ~* '^Êmpos' > ) > > [09-Jul-2014 23:17:25] P.MAPPER debug info > P.MAPPER-DEBUG: squery.php/dumpPGQueryResults() - SQL Cmd: > SELECT id, > ST_xmin(box3d(the_geom)), > ST_ymin(box3d(the_geom)), > ST_xmax(box3d(the_geom)), > ST_ymax(box3d(the_geom)), > id,tipo,nome_1,nome_2,nome_3,comprada,observ > FROM edificios.casas > WHERE nome_1 ~* 'pedro' OR nome_2 ~* '^Êmpos' > LIMIT 301 > > > That is, it replaces "%campos%" by "Êmpos%". In fact, it replaces the "%ca" > by "Ê" and "%ce" by "Î". And this is because this line on queryeditor.js > > query = query.replace('%','%25'); > > apparently only works for the first "%" of the first clause of WHERE. In the > second clause, it does not replace the "%" by "%25", which will not prevent > "%ca" to be replaced by "Ê". > > > Anyone confirms? > > > Thank you very much. > > > Best regards, > Pedro > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > pmapper-users mailing list > pmapper-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/pmapper-users > > -- Thomas RAFFIN Chef de Projet Internet traf...@sirap.fr <mailto:traf...@sirap.fr> Sirap <http://sirap.fr> Tel : 04 75 72 84 10 Fax : 04 75 70 07 98 Rue Paul Louis Héroult - BP 253 26106 Romans cedex ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users