Im having a little trouble getting sorting to do what I want...

describe resources;
+-------------+---------------+------+-----+---------+----------------+
| Field       | Type          | Null | Key | Default | Extra          |
+-------------+---------------+------+-----+---------+----------------+
| id          | int(11)       |      | PRI | NULL    | auto_increment |
| title       | varchar(64)   |      |     |         |                |
| url         | varchar(255)  |      |     |         |                |
| location    | varchar(64)   |      |     |         |                |
| category    | varchar(128)  |      |     |         |                |
| description | text          |      |     |         |                |
| prefer      | char(1)       |      |     | 0       |                |
| sort_order  | int(1)        |      |     | 9       |                |
| status      | char(1)       |      |     | 0       |                |
| updated     | timestamp(14) | YES  |     | NULL    |                |
| added       | timestamp(14) | YES  |     | NULL    |                |
+-------------+---------------+------+-----+---------+----------------+

My sql is order by sort_oder ASC, added;

At first, I had no value set for the default in sort_order, but those came
up first.  I am looking to get a ascending sort order that will ignore the
reocrd, or basically shove it to the end of the sort if it is empty or null.

Can this be done?  Or is my only option in this case to set it to 9 to force
those records to the end?

I could not seem to alter the field to get it to change them all to null, so
I was unable to test if null is sorted first or last, or ignored altogether.

thanks

-- 
-------------------------------------------------------------
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