Hi Ash,

> I am using MySQL 3.22.32 and are trying to accomplish the following (without
> going into too much detail, this is an example of the exact situation)...
>
> 1) I have two tables:
>
>  a) User table containing: UserID, FullName
>  b) Project table containing: ProjectID, ProjectManagerID and ProjectOwnerID
>
>  ProjectManagerID and ProjectOwnerID are effectively UserIDs from the User
> table.
>
> 2) When I pull a particular record from the database by ProjectID, for
> readability purposes, I would like the accompanying ProjectManagerID and
> ProjectOwnerID to
> be displayed as a name, not an ID (for example: John Smith, not A12930).
>
> Has anyone got any ideas how I can select (within one record) both names
> from the User table by each respective UserID (represented by the
> ProjectManagerID and the ProjectOwnerID)??


This is quite logical (when you look back at it!). Set up two joins from Project to 
User, the first equating
ProjectManagerID to UserID and the second ProjectOwnerID to UserID - just because User 
is only one table,
doesn't mean you can't have multiple ways of joining to it!

If that's not it, please send the query you have so far.

Regards,
=dn




---------------------------------------------------------------------
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

Reply via email to