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.sitename
> etc. but it
> doesn't work.
>
> $query = "SELECT * FROM department LEFT JOIN sites S1 ON
> deptsite1=S1.sitekey LEFT JOIN sites S2 ON deptsite2=S2.sitekey ORDER BY
> $order $dir";
...
---------------------------------------------------------------------
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