[Cartoweb-users] locate autocompleter and special characters

Oliver Christen oliver.christen at camptocamp.com
Fri Nov 21 02:49:25 EST 2008


Hi

all you have to do is modify the line

$sql = sprintf($sql, $substr);

simply assign to $sql the actual sql query you want mapserver to perform. 
the variable $substr should contain the searched string

regards
Oliver


----- Original Message ----- 
From: "wochter" <wochter at seznam.cz>
To: <cartoweb-users at lists.maptools.org>
Sent: Friday, October 31, 2008 1:33 PM
Subject: Re: [Cartoweb-users] locate autocompleter and special characters


> Yes, you are right,
> Postgres doesn't support user defined collate with actual version :-(
> But I wrote function wox_unaccent() to solve my problem.
> I can use it like this:
> SELECT * FROM table WHERE wox_unaccent(column) = wox_unaccent('anytext');
>
> But I realy don't know how to change function getList.
> I cannot understand this function :-(
> Could you help me please?
>
> thanx
>
> wochter
>
>
> Oliver Christen  wrote / napísal(a):
>> Hi
>>
>> isnt this a sql problem ?
>>
>> usualy string are stored simplified in the database and the querystring
>> is simply simplified for the search.
>> but since you seem to want it the other way around (getting a specific
>> string based on a simplified querystring),
>> the closest thing that comes to my mind is this:
>> http://www.postgresql.org/docs/8.3/static/fuzzystrmatch.html
>> which allow to search for string which are close to what you search.
>>
>> the query is triggered in function getList in the php, so you can
>> certainly add some more complex sql queries / treatments.
>>
>>
>> regards
>> Oliver
>>
>>> Hi,
>>> I'd like to use locate plugin.
>>> But there are the special (czech, slovak,...) characters like:
>>> ščžýáíéŠČŽÝÁÍÉ.
>>> I have names of towns stored in postgres with them original czech names.
>>> Id like to substitute that chars by standard chars: č-c š-s ž-z....
>>> Now I have to write: Čáslav when I want to find this town.
>>> I'd like to write: caslav.
>>>
>>> I found Extra local autocomplete options:
>>> - choices
>>> - partialSearch
>>> - fullSsearch
>>> - partialChars
>>> - ignoreCase
>>>
>>> but no one from that helps me solve my problem.
>>> Is there any way to do that please?
>>>
>>> thanx
>>>
>>> wochter
>>>
>>>
>>> _______________________________________________
>>> Cartoweb-users mailing list
>>> Cartoweb-users at lists.maptools.org
>>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>>>
>>
>>
> _______________________________________________
> Cartoweb-users mailing list
> Cartoweb-users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/cartoweb-users
> 



More information about the Cartoweb-users mailing list