sorting - MYSQL vertical sort using different columns? -


I'm not sure whether this is possible - I'm trying to work it with the CASE statement,

  MA vt CT D 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0   

What do I have to do, sort by state There are rows. Every time I try more than one column in my CASE statement, I get an error in PHPmyAdmin. In the example below, I am trying to solve just two states to get the syntax rights. Not sure if this is me, or if this is not possible:

  SELECT * in case of tblState D order when MA is then the case of 1 and 0 when VT again 2 and 0 ASC   

Any ideas?

Why not do this, suppose you want the state in alphabetical order: < pre> sequence by whistle, de des, ma des, vt des

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -