that will work..
or if you can guarantee that it always prefixed with '#' you can try
select id from mydata
order by if(left(id,1)='#',concat('z',id),id)
or if you didnt sure.. you can try the similiar way..
select id from mydata
order by if(left(id,1)<'A',concat('z',id),id)
just make sure that
select id from mydata order by name.
If that puts the #125 first etc. simply created a field called
'order_field' or whatever and put numeric values in them.
The SELECT id, name FROM mytable ORDER by order_field.
dan orlic wrote:
Ok, I have a client that has a specific request. the ordering of da
Ok, I have a client that has a specific request. the ordering of data.
For example current the order by returns this:
id | Name
--
1 | #124
2 | #125
3 | #155
4 | apples
5 | bacon
but he would rather see the data as :
id | Name
--
1 | apples
2 | bacon
3 | #124
4 | #125
5 |