dbTalk Databases Forums  

Sort using utf characters in mysql? best solutions...

comp.databases.mysql comp.databases.mysql


Discuss Sort using utf characters in mysql? best solutions... in the comp.databases.mysql forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Luuk
 
Posts: n/a

Default Re: Sort using utf characters in mysql? best solutions... - 03-06-2011 , 01:44 PM






On 06-03-2011 13:57, The Natural Philosopher wrote:
Quote:
Luuk wrote:
On 05-03-2011 15:10, Jerry Stuckle wrote:
On 3/4/2011 7:50 PM, SM wrote:
......
When doing INSERTs and UPDATE's, I will use use a
normalize() function in PHP that produces a list with no punctuation,
all lower case, accents stripped, etc...

I believe at the end, that it's the best solution...

Thanks for all of your tips and guiding.
If you're insisting on adding another column for sorting, then update it
with a trigger. Don't depend on the application to do it.


But that will only be possible if the function he describes above
available is in mysql...

And is about as silly as saying that you cant rely on a PHP or other
application to do an insert or an update.

Since calculating what goes in the field will be part of what goes
before you insert it or update it.
hmm, my English must be bad.....

the OP wanted to do an INSERT, therefore hea wanted to use PHP to
calculate some value....

Jerry suggested to use a trigger to do that which, in my opinion,
requires a function in MySQL to calculate that column.

It can be hard to do that, depending on wat this 'function' should do.

--
Luuk

Reply With Quote
  #12  
Old   
Jerry Stuckle
 
Posts: n/a

Default Re: Sort using utf characters in mysql? best solutions... - 03-06-2011 , 01:53 PM






On 3/6/2011 2:44 PM, Luuk wrote:
Quote:
On 06-03-2011 13:57, The Natural Philosopher wrote:
Luuk wrote:
On 05-03-2011 15:10, Jerry Stuckle wrote:
On 3/4/2011 7:50 PM, SM wrote:
......
When doing INSERTs and UPDATE's, I will use use a
normalize() function in PHP that produces a list with no punctuation,
all lower case, accents stripped, etc...

I believe at the end, that it's the best solution...

Thanks for all of your tips and guiding.
If you're insisting on adding another column for sorting, then update it
with a trigger. Don't depend on the application to do it.


But that will only be possible if the function he describes above
available is in mysql...

And is about as silly as saying that you cant rely on a PHP or other
application to do an insert or an update.

Since calculating what goes in the field will be part of what goes
before you insert it or update it.

hmm, my English must be bad.....

the OP wanted to do an INSERT, therefore hea wanted to use PHP to
calculate some value....

Why use PHP to calculate the value? What happens if, for instance, he
now has to add PERL code to add from another application? Of course, he
also has to add code every place he may UPDATE the name column...

Quote:
Jerry suggested to use a trigger to do that which, in my opinion,
requires a function in MySQL to calculate that column.

And there are a bunch of functions in MySQL.

Quote:
It can be hard to do that, depending on wat this 'function' should do.

Exactly what do you see that's hard about what he wants to do?

Much better for the database to take care of this itself.


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex (AT) attglobal (DOT) net
==================

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.