Re: Specific order by MySQL statement

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



One possibility is to use codes for this filed, such as:

10 for Current;
20 for Completed;
30 for Withdrawn;
40 for Transferred.

a.s.o.

If you will discover other "states" of the field you can "insert" them
apropriatelly (if you want Canceled state to be inserted and to be
displayed last put the code 45 for it).

Best regards, 
Aurel


On Mon, 2005-11-07 at 11:47 +0000, Adrian Bruce wrote:

> Hi
> 
> I am trying to get results from a MySQL query in a specific order, just 
> using ASC or DESC will not work.
> 
> For Example I have a field that can contain 4 possible values: 
> 'Current', 'Completed','Withdrawn' or 'Transferred',  I would like to 
> order the results specifically like:
> 
> Current
> Completed
> Withdrawn
> Transferred
> 
> Is there any way i can do this using MySQL?  Any help will be much 
> appreciated.
> 
> Thanks, Ade
> 

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux