I have 2 tables tbl1 and tbl2 tbl1 has userid col1 col2 col3 (multiple records per user) EDIT tbl2 has userid col4 col5 col6 (Single record per user) On my original post I had col3 listed here as well which was accident.
tbl2 is used to store custom column names for each user.
now I need to know how do I display this custom column name on results. ie how do I reference alias to pull this custom column name for each user.
SELECT col1 AS (Dont know what to put here...)
Something like ...col1 AS tbl2.col3 where userid = "testuser" How can I accomplish this? Maybe somekind of outer/inner query???
Thanks