Page 1 of 1

Dynamic tables & report

Posted: Wed Jun 27, 2012 2:16 pm
by dimxasnewfrozen
I have two dynamically generated tables:

Field Names:
ID (PK),
Field Name

Field Values:
Field ID
Field Value

So given that a user selects field names with the ID of 1, 3, 5, 7

I need get results that look something like:

Field Name1 | Field Name3 | Field Name5 | Field Name7
value null test null
value2 value null null
value3 value4 null null

I explained that rather poorly - and I thought there was a Database section on this forum?

Re: Dynamic tables & report

Posted: Thu Jun 28, 2012 1:22 pm
by Christopher
Something like:

SELECT names.name, values.value FROM names JOIN values ON names.id=values.id

Re: Dynamic tables & report

Posted: Thu Jun 28, 2012 7:55 pm
by califdon
dimxasnewfrozen wrote:I explained that rather poorly - and I thought there was a Database section on this forum?
There is. Just click on Board Index at the top of the page, then look for Databases.