Hehe, sounds tricky.

There's prossibly a more elegant solution, but this one may work, aliasing
the master table a few times with different names:

SELECT s.*, r1.name, r2.name, r3.name
FROM schedule s, ref_master r1, ref_master r2, ref_master r3
WHERE s.ref1_id=r1.id
  AND s.ref2_id=r2.id
  AND s.ref3_id=r3.id

I sure it would work in Oracle, a little curious about it working in mysql.

Good Luck,
-Joe

""Brett"" <[EMAIL PROTECTED]> wrote in message
01a701c0ae6e$fcacea00$e1214ed8@bcnu">news:01a701c0ae6e$fcacea00$e1214ed8@bcnu...
> I am retrieving values to form a shedule for referees.  The master shedule
> contains all info for a given date with three referees for that game.  The
> three referees are refrenced by their id number from the referee
information
> table.  I am now stuck trying to figure out how to take the three referee
> id's from the results and display the names and email address for each id.
> I am capable of writing a query to return the results from the master
> schedule table and the information for each id from the referee info
table,
> but do not know how to form the query so that where the id would be
> displayed I can display the name and email instead.  I use mysql and I
hope
> I explained this in a reasonable way.  Any comments suggestions will be
much
> appreciated.
>
> Brett
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to