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 them at the beginning instead.

The interface I have made for adding records is probably not idea, I have a
input type = text html field, if I leave it blank, NULL does not get
inserted, rather a 0 does.  I have the default set to '9' now.  I would have
to make alterations to my admin interface to allow NULL to be input on new
record creation.  I don't really want to do this.

Is there any way to have a ASC sort order that sends 0 to the end, and sorts
on 1-9?  I know a strange request, but this would be simplest in my case.

-- 
-------------------------------------------------------------
Scott Haneda                                Tel: 415.898.2602
http://www.newgeo.com                       Fax: 313.557.5052
[EMAIL PROTECTED]                            Novato, CA U.S.A.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to