Jump to content

Sorting out two rows


tripper

Recommended Posts

Hello, im using php to manipulate data in mysql and output it onto a site. I want to sort out two rows in a table like example:

 

D  X

F  X

A  O

B  X

E  O

C  O

into something like this

A  O

C  O

E  O

B  X

D  X

F  X

(so you notice that all the names corresponing to 'O' are sorted out ..same with 'X') Any ideas?

Thanks

Link to comment
Share on other sites

the data is stored  pretty much like in the example..except the letters A,B,C correspond to the names and O,X is as it is. There are a few more columns in the table, but im only looking at these two.

Iam not sure what you mean by how it is stored. Its just a table with a bunch of columns in Mysql. And Im using php, to ouput that table to a site. I can manage everything else, its just the sorting. First I have to sort out the 'O' and the 'X's then, sort the names within the 'O's and sort the name within the 'X's

Thanks

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.