0

In short, all data is sorted into rows per value.

I have 4 columns I need to work with, ENTRY_ID, FIELD_ID, VALUE, and FORM_ID which is what I want to use to sort entries per form.

This is driving me nuts because I know it should be simple.

I have 2 examples I need to get out, one being COLUMNS based on all FIELD_IDs and VALUES per ENTRY_ID in a row, another that use UNIQUE VERSIONS OF THE VALUES AS columns (e.g. think days of the week).

If anyone can help it would be amazing.

Unheilig
  • 16,196
  • 193
  • 68
  • 98
dbledayr
  • 13
  • 2

1 Answers1

0

If I understand your question, you want to perform some pivoting of your table.

Take a look at this answer: MySQL pivot table

Community
  • 1
  • 1
g_tec
  • 631
  • 4
  • 9
  • Yeah, I need to create a few different variations. A pivot table makes sense for my first example, but then I don't see where it would take place where I am using some of those values as columns for other values. – dbledayr Nov 22 '15 at 01:57
  • In both cases, if I understood your second example, you need to create some kind of dynamic pivot table, just with different criterias on the columns. – g_tec Nov 22 '15 at 02:01