Msg#: 4409396 posted 10:33 am on Jan 21, 2012 (gmt 0)
I'm trying to echo some basic enough information from 2 db tables but I've just confused myself by trying to add stuff from a third table into the mix.
I have 4 tables, 'topics' which links everything and contains just ID numbers and creation and last post dates, 'person_a' which contains p_a_ID|p_a_name|author|date, 'person_b' (very similar)
This was fine until I added 'author_ID' and 'lpauthor_ID' fields to the topics table. Those ID's will link to the new 'members' table but of course they both link to the same field there 'member_name'.
I hope that makes sense...do I need to just make a seperate query for author and last post authors. I did think I could just stash the names as text in the topics table which would solve the problem but goes against the general "try not to store the same info twice" database rule.
I've that annoying feeling it's really simple and probably just needs an AS in the right place or something but I've tried a few things to no avail so far.