Re: german

From: Date: Thu, 07 Dec 2000 02:09:18 +0000
Subject: Re: german
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-29031@lists.php.net to get a copy of this message
Andreas, How big are your result sets? How critical is time? I'm musing, so don't jump to conclusions. Let's call this character field you will sort on cSurname. What about setting another field in the table, called cSortSurname, which contains a processed version of the contents of cSurname. A function triggered by an update or insert on cSurname generates the contents of cSortSurname whenever those change. This function parse the string and changes the high value ascii characters to their standard equivalent. Thus your Ä would become A. Alternately, it could simply calculate an integer which would correspond to the appropriate sort value. Your select statement would then read something like "SELECT * FROM tblTable ORDER BY cSortSurname". This is really ugly, awkward and I don't like it. In fact MySQL may not even handle this kind of trigger and you may have to create this field in when you prepare all your insert / update statements. Have you done a search on SELCT .. ORDER BY for different databases: DB2, Sybase, Informix, Oracle. I know PostgreSQL doesn't support different ORDER BY types. Finally, what about just using the German charset when you compile? It would give reliable results for English, wouldn't it? I don't know, just asking. Interesting problem - Miles Thompson "andreas (@work)" wrote: > hi, > > mysql & php > > any idea how force a SELECT Statement to use propper german sort-order > > SELECT * FROM tblTable ORDER BY fField > > A > Ä > B > C > D > E > F ... > > result right now > > A > B > C > D > E > F > Ä > > thanks > > andreas

« previous php.general (#29031) next »