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?
Dynamic tables & report
Moderator: General Moderators
-
dimxasnewfrozen
- Forum Commoner
- Posts: 84
- Joined: Fri Oct 30, 2009 1:21 pm
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: Dynamic tables & report
Something like:
SELECT names.name, values.value FROM names JOIN values ON names.id=values.id
SELECT names.name, values.value FROM names JOIN values ON names.id=values.id
(#10850)
Re: Dynamic tables & report
There is. Just click on Board Index at the top of the page, then look for Databases.dimxasnewfrozen wrote:I explained that rather poorly - and I thought there was a Database section on this forum?