I have a MySQL database that consists of a master table with records consisting of a mix of actual data values in columns and columns with pointers to lookup tables very similar to the following:
Database
mastertable
col1 primary key
col2 text data
col3 primary key value of record in lookuptable1
col4 primary key value of record in lookuptable2
lookuptable1
col1 primary key
col2 text data
lookuptable2
col1 primary key
col2 text data
Believe it or not I actually managed to successfully get the lookup tables to display in dropdown lists for the input of data in to the master table.
What I do need help with is how to extract the text data from each lookup table so that the resulting web page displays master table using the text data and not the numeric value of the associated primary key. I will be formatting the output to look like the following:
mastertable
record1 | mastertable col2 | lookuptable1 col2 | lookuptable2 col2
record2 | mastertable col2 | lookuptable1 col2 | lookuptable2 col2
...........
recordn | mastertable col2 | lookuptable1 col2 | lookuptable2 col2
The numeric values in the master table I can get. The asociated text value in the lookup tables I cannot.
Thanks in advance for any help offered.