Re: RE: JOIN to the same table multiple times

2001-06-10 Thread Bob Hall
>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

Re: RE: JOIN to the same table multiple times

2001-06-09 Thread rgoonan
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

RE: JOIN to the same table multiple times

2001-06-09 Thread Bob Hall
gt;$r[deptphone2] >$r[deptfax2] >$r[deptemail2] >$r[deptmobile2] >$r[sitename] >$r[deptphone3] >$r[deptfax3] >$r[deptemail3] >$r[deptmobile3]"; > > >-Original Message----- >From: Ross Goo

RE: JOIN to the same table multiple times

2001-06-08 Thread Chris Bolt
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

RE: JOIN to the same table multiple times

2001-06-07 Thread Ross Goonan
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

JOIN to the same table multiple times

2001-06-07 Thread Ross Goonan
### 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