hi all,
i have a query:
SELECT Schedule.PlayDate, HT.TeamID, AT.TeamID FROM Schedule, Team HT, Team AT WHERE (Schedule.HomeTeamID = 1 or Schedule.AwayTeamID = 1) and (HT.TeamID = Schedule.HomeTeamID) and (AT.TeamID = Schedule.AwayTeamID)
which produces the following result:
PlayDate TeamID TeamID
2002-09-10 5 1
2002-09-17 4 1
2002-09-24 1 18
2002-10-01 1 6
2002-10-08 17 1
2002-10-15 10 1
2002-10-22 1 9
2002-10-29 1 7
2002-11-05 19 1
my problem is here: how in a PHP script do I get both TeamIDs
I tried
$row("HT.TeamID") and $row("AT.TeamID")
$row("TeamID(1)") and $row("TeamID(2)")
$row("TeamID[1]") and $row("TeamID[2]")
but no matter what i try, i get an undefined index error....
can someone please point me in the right direction?
thanks so much in advance for your help!
meg
referencing a column from query?
Moderator: General Moderators
-
tennis_blues
- Forum Newbie
- Posts: 21
- Joined: Sun Oct 20, 2002 8:30 am
tryto see what's in...
if nothing else helps try
Code: Select all
print_r($row);if nothing else helps try
Code: Select all
SELECT Schedule.PlayDate, HT.TeamID as hteamID, AT.TeamID as ateamID