473,395 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Mysql List

Hi
I am writing a query to list some fields in asc,and desc.i want to list the field in my won order. that is my filed name is Status, in this i stored a values High, Low and Medium. I am able to sort this field in asc and desc but i want list in High,Medium and Low and also the opposite way that is Low,Medium and High.

How can i do this
Pls anyone help to do this
Thank you
Feb 11 '08 #1
3 1222
ronverdonk
4,258 Expert 4TB
Use the ORDER BY FIELD like this:
[php]
SELECT * FROM table_name ORDER BY FIELD(status,'Low', 'Medium', 'High')
[/php]
Ronald
Feb 11 '08 #2
Use the ORDER BY FIELD like this:
[php]
SELECT * FROM table_name ORDER BY FIELD(status,'Low', 'Medium', 'High')
[/php]
Ronald
I solved that problem.

Thankyou Very much for your Kindly help.
Feb 12 '08 #3
Use the ORDER BY FIELD like this:
[php]
SELECT * FROM table_name ORDER BY FIELD(status,'Low', 'Medium', 'High')
[/php]
Ronald
Hi
one more question to solve my problem.In system folder view we have the option to show the file name in asc and desc and the same way show the file size,date modified. in the same way i want to print the above status in my application. but i don't have any idea for that so give me a suggestion how can i do that.

Thankyou very much
Geethu
Feb 12 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: George Augustino | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.databases.mysql Newsgroup line: comp.databases.mysql MySQL relational database system discussion group. This is a formal Request For...
4
by: Ben | last post by:
Hi I am new to C++ and I want to know if C++ is suitable for making a GUI application with a MySQL database. I also want to know what keywords in books I should look for. Is DATA STRUCTURES a...
0
by: Girish Agarwal | last post by:
--0-474210375-1058976151=:31789 Content-Type: text/plain; charset=us-ascii Content-Id: Content-Disposition: inline Note: forwarded message attached. __________________________________
0
by: miguel solórzano | last post by:
At 14:47 24/7/2003 +0200, Stefan Hinz wrote: Hi, > > (I think I messed up here. I decided to start from scratch, I removed > > "MySQL Servers and Clients 4.0.13" from the program list (as it...
0
by: Donald Tyler | last post by:
Then the only way you can do it that I can think of is to write a PHP script to do basically what PHPMyAdmin is trying to do but without the LOCAL in there. However to do that you would need to...
0
by: Gary Broughton | last post by:
Thanks to everybody for all your help and advice. It seems Linux is going to HAVE to be the next step, but while I know sod all about it, I have enlisted the help of a colleague to assist with...
0
by: I.P. | last post by:
No one has replied to my post. ----- Original Message ----- From: "I.P." <jancio_wodnik@wp.pl> To: <mysql@lists.mysql.com> Sent: Monday, August 18, 2003 1:01 PM Subject: mysql 4.0.14 +...
0
by: Mark Adams | last post by:
I am a relative newbie to MySQL. I had a Postfix+Courier+MySQL mail server running for several months. It took me a week or so to get it up and running in September. Now, I did a clean upgrade to...
6
Atli
by: Atli | last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users. Anyone should be able to get...
221
Atli
by: Atli | last post by:
You may be wondering why you would want to put your files “into” the database, rather than just onto the file-system. Well, most of the time, you wouldn’t. In situations where your PHP application...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.