Jump to content

Data Ordering/SQL question


k0z

Recommended Posts

Lets say i have a table, and within this table i have the following Fields:

 

Field 1: a

Field 2: a_column

Field 3: b

Field 4: b_column

Field 5: c

Field 6: c_column

 

The Fields without the _column on the end ONLY contain a numerical value 1-10, which represents what order they should display in. The Fields WITH _column on the end contain either "left" or "right", which determine which column (left or right) to display in.

 

My question is, how can I determine which is which. So for example, if the Fields contained these values:

Field 1: a = 1

Field 2: a_column = "left"

 

Field 3: b = 1

Field 4: b_column = "right"

 

Field 5: c = 2

Field 6: c_column = "right"

 

How would I determine the following:

 

Left column:

First: a

--

Right column:

First: b

second: c

 

 

Thanks for your time.

 

Link to comment
https://forums.phpfreaks.com/topic/173730-data-orderingsql-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.