[nycphp-talk] MySQL and ORDER BY kludging
Chris Bielanski
Cbielanski at inta.org
Wed Mar 3 12:05:52 EST 2004
Thanks for the tips, Adam.
Based on the docs, we'd have to make the leap from MySQL 3.5.x to <= MySQL
4.1.0 and soon after (or concurrently) migrate to mysqli_*().
Heavy stuff. However, if I am charged with such a task, I will be sure to
keep notes on the COLLATE feature and how it works out.
~C
> -----Original Message-----
> From: Adam Maccabee Trachtenberg [mailto:adam at trachtenberg.com]
> Sent: Wednesday, March 03, 2004 10:56 AM
> To: NYPHP Talk
> Subject: Re: [nycphp-talk] MySQL and ORDER BY kludging
>
>
> On Wed, 3 Mar 2004, Chris Bielanski wrote:
>
> > Does anyone have experience with making MySQL do an ORDER
> BY for different
> > (or multiple) charsets?
>
> You want to use MySQL 4.1. See:
>
> http://www.mysql.com/doc/en/Charset.html
> http://www.mysql.com/get/Downloads/Presentations/MySQL-User-Co
nference-2003/National-Character-Sets-and-Unicode.pdf/from/pick
> I have DB full of unicode (single-byte, I think) strings and the default
> ORDER BY is UTF-8 according the MySQL docs. They also mention that this
can
> be altered but I couldn't quite figure out how to go about it.
>
> Predictably, there is an interest in getting the sort from the query such
> that:
>From what I've read, you can get MySQL 4.1 to collate a table based on
a character set. I haven't actually played with this feature, however,
so I would be interested in your experiences.
Also, if you're using MySQL 4.1 with PHP 4, be sure to use the
--old-passwords flag and don't upgrade the password on any account
that uses the old mysql client to the larger length, or you'll be
stuck. :)
If you're using PHP 5, then you should download the latest MySQL 4.1.x
snapshot from http://snaps.mysql.com as the most recent packaged
version won't work.
-adam
--
adam at trachtenberg.com
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!
_______________________________________________
talk mailing list
talk at lists.nyphp.org
http://lists.nyphp.org/mailman/listinfo/talk
More information about the talk
mailing list