>Hi,
>Thanks for the reply.
>
>The sites (deptsite1 deptsite2) on the department file are the numeric key
>to the actual site file.
>
>The query below works fine (in mysql & php) but how do I reference the
>sitename for the joins that have happened?
>
>Specifying
> $result = mysql_db_query
t; >$r[deptfax1]
> >$r[deptemail1]
> >$r[deptmobile1]
> >$r[sitename]
> >$r[deptphone2]
> >$r[deptfax2]
> >$r[deptemail2]
> >$r[deptmobile2]
> >$r[sitename]
> >$r[deptphone3]
> >$r[deptfax3]
> >$r[deptemail3]
> >$r[deptmobile3
gt;$r[deptphone2]
>$r[deptfax2]
>$r[deptemail2]
>$r[deptmobile2]
>$r[sitename]
>$r[deptphone3]
>$r[deptfax3]
>$r[deptemail3]
>$r[deptmobile3]";
>
>
>-Original Message-----
>From: Ross Goo
You really shouldn't be using SELECT *. Try SELECT S1.sitename AS
FirstSiteName, S2.sitename AS SecondSiteName, etc etc etc.
> Ok, I've answered my own question but now have another.
>
> How do I reference the sitename for the 3 sites?
> sitename returns the last sitename for all 3 I tried S1.sit
ptfax2]
$r[deptemail2]
$r[deptmobile2]
$r[sitename]
$r[deptphone3]
$r[deptfax3]
$r[deptemail3]
$r[deptmobile3]";
-Original Message-
From: Ross Goonan [mailto:[EMAIL PROTECTED]]
Sent: Friday, 8 June 2001 11:47
To: [EMAIL PROTECTED]
Subject: JOIN to
###
Creating a Telephone / Information Directory with MySQL / PHP3
People belong to a department & a site.
Need to be able to:
List all people
List all people within a Department
List all people within a sit