Martin Cotterill
asked on
Say one thing in the code and show another on the page
Hello all
I seen this done but I can't remember how so I'd thought I'd ask those who would know.
I have an SQL statement:
SELECT ID, MenuItem, SubSection, SectionContentTitle
FROM tblMainData
WHERE [SubSection] = 2 AND [ID] >= 301 AND [MenuItem] = true
When I add the fields to my webpage my 'SubSection' field shows as '2'.
The table 'tblMainData' gets the data for 'SubSection' from a table called 'tblSubSections' which has two fields 'ID' and 'SubSection'. The 'SubSection' field in 'tblMainData' is linked to the 'ID' field of 'tblSubSections'.
How do I alter the code above so that the webpage shows the data from the 'SubSection' field in 'tblSubSections' instead of the 'ID'?
Regards
Martin
I seen this done but I can't remember how so I'd thought I'd ask those who would know.
I have an SQL statement:
SELECT ID, MenuItem, SubSection, SectionContentTitle
FROM tblMainData
WHERE [SubSection] = 2 AND [ID] >= 301 AND [MenuItem] = true
When I add the fields to my webpage my 'SubSection' field shows as '2'.
The table 'tblMainData' gets the data for 'SubSection' from a table called 'tblSubSections' which has two fields 'ID' and 'SubSection'. The 'SubSection' field in 'tblMainData' is linked to the 'ID' field of 'tblSubSections'.
How do I alter the code above so that the webpage shows the data from the 'SubSection' field in 'tblSubSections' instead of the 'ID'?
Regards
Martin
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
What a great name!
Thanks for the reply and the code.
Excellent job!
Regards
Martin