RE: sort order

2012-05-30 Thread Rick James
"a" and "A" are identical, according to utf8_unicode_ci and utf8_general_ci, but not utf8_bin. That is, I would not expect "[" to slip in between them. About 80% of the way down this page, there is a list of some of the 'equivalences' in selected collations: http://mysql.rjweb.org/doc.php/charc

Re: sort order

2012-05-30 Thread Wes James
In phpMyAdmin it says the database collation is utf8_unicode_ci and each of the columns is utf8_unicode_ci except the ID primary key column. If you create a simple table with ID and TITLE and put the data below (each row in a record) and run 'select * from table order by title' what do you get? C

Re: sort order

2012-05-30 Thread Wes James
I'll double check and get back. Thanks, -wes On Wed, May 30, 2012 at 3:43 PM, Carlos Proal wrote: > > Hi Wes, have you double checked you character set and collation ?? > > http://dev.mysql.com/doc/refman//5.5/en/charset-charsets.html > > The collation is which determines the sorting order. > >

Re: sort order

2012-05-30 Thread Carlos Proal
Hi Wes, have you double checked you character set and collation ?? http://dev.mysql.com/doc/refman//5.5/en/charset-charsets.html The collation is which determines the sorting order. Carlos Proal On Wed, May 30, 2012 at 4:02 PM, Wes James wrote: > I have mysql 5.1.62-0ubuntu0.11.10.1 installe

Re: Sort order

2003-09-14 Thread Paul DuBois
At 6:33 PM -0700 9/14/03, Scott Haneda wrote: on 09/14/2003 06:14 PM, Paul DuBois at [EMAIL PROTECTED] wrote: ORDER BY IF(sort_order IS NULL,1,0), sort_order, added; select title, sort_order from resources order by IF(sort_order IS NULL,1,0) sort_order ASC limit 5; ERROR 1064: You have an error i

Re: Sort order

2003-09-14 Thread Paul DuBois
At 6:27 PM -0700 9/14/03, Scott Haneda wrote: on 09/14/2003 06:14 PM, Paul DuBois at [EMAIL PROTECTED] wrote: You can force NULL values to be sorted to either end by adding another sort column: ORDER BY IF(sort_order IS NULL,1,0), sort_order, added; That'll sort NULL values at the end. Use I

Re: Sort order

2003-09-14 Thread Scott Haneda
on 09/14/2003 06:14 PM, Paul DuBois at [EMAIL PROTECTED] wrote: > ORDER BY IF(sort_order IS NULL,1,0), sort_order, added; select title, sort_order from resources order by IF(sort_order IS NULL,1,0) sort_order ASC limit 5; ERROR 1064: You have an error in your SQL syntax near 'sort_order ASC limi

Re: Sort order

2003-09-14 Thread Scott Haneda
on 09/14/2003 06:14 PM, Paul DuBois at [EMAIL PROTECTED] wrote: > You can force NULL values to be sorted to either end by adding another > sort column: > > ORDER BY IF(sort_order IS NULL,1,0), sort_order, added; > > That'll sort NULL values at the end. Use IF(sort_ORDER IS NULL,0,1) > to sort t

Re: Sort order

2003-09-14 Thread Paul DuBois
At 5:52 PM -0700 9/14/03, Scott Haneda wrote: Im having a little trouble getting sorting to do what I want... describe resources; +-+---+--+-+-++ | Field | Type | Null | Key | Default | Extra | +-+-