
Hi Marcello, just you more after thought. I assume you have a database. If so just add another or more field for sorting and adjust the information from other fields. this is a one time trip and you have the sorting that you need, just use sort by functions. Of course I am assuming that your database is structured. regards Keith. Am 24.09.2009 um 13:00 schrieb Marcello Perathoner:
Keith J. Schultz wrote:
In my original post I NEVER said where this code could be used whether on the web server or DB server.
If you intended your code to be run on the database server, it would be an even more incredibly stupid thing to do.
If you want to influence the database server, then you must not write a routine that *compares* strings, but a routine that *transforms* strings:
If you wanted to sort like German phonebooks do, that is: to sort 'ö' as 'oe', then you would write a routine that substitutes all 'ö's in your input with 'oe's. Then you would feed the transformed string to the index table while feeding the original string to the data table. Voilà.
Of course you would have to transform all search terms in the same fashion too, because databases do most of the work on index tables and reach out to the data tables only when they really really really need to.
Furthermore, I mentioned that the standard sort routines used in a DB server can be overiden and the supoopsed code can be used.
How would you know? You don't even know which database we are using.
My solution will work anywhere you want it to.
Your `solution´ didn't even work on paper. I found 3 fat bugs just on a first eyeball revue.
I have programmed just such a situation and had no overhead. the database that was acessed via a web-server was set so that no new sorting or indexing was required when the db was called.
You programmed a small in-house application that gets hit a dozen times a day. In your situation you can get away with any amount of programming sloppiness because the hardware is so much superior to the task.
I am running a site that gets more than 1 Megahits a day, serving more than 70,000 customers per day.
Failure to consider scalability issues is another telltale sign of the rookie.
-- Marcello Perathoner webmaster@gutenberg.org _______________________________________________ gutvol-d mailing list gutvol-d@lists.pglaf.org http://lists.pglaf.org/mailman/listinfo/gutvol-d