Sorry, I've been too long in a list where you just answer the questioner and then the questioner writes a summary of the answers to the list. Sabine
Sabine Richter wrote: > > Hi Ron, > > I suspect users.id and userid1 / userid2 have to be joined? > > Then: > > select your_desired_cols > from users u1, users u2, log > where u1.id=log.userid1 > and u2.id=log.userid2; > > Bye > Sabine > > Ron Jamison wrote: > > > > Hi, > > > > Consider the following schema: > > > > Database.Users: > > id > > username > > > > Database.Log: > > id > > userid1 > > userid2 > > entry > > > > If I'm SELECT'ing on the Log table and I want to pull usernames out of > > Users table for both users (which will most likely be unique) is there a > > specific JOIN for this? Forgive me if I've missed something in the > > manual pages; I've always had to do two SELECTs and thus have been > > looking for a quick[er] solution to this for some time now. > > > > Thank you in advance! > > > > Ron Jamison > > > > (moderators: although I've looked at the manual page plenty of times > > before, http://www.mysql.com/doc/manual.php?search_query=join today > > produced the following: > > > > "Search results > > > > Did you mean jan? > > > > The search for 'join' produced no results " -- kind of ironic) > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php