Three tables, GameSched, UmpSched, GameLoc.
PK stands for Primary Key, FK is Foreign Key.
GameSched has Day,Date,Time,Home,Away,Location,ID(PK)
GameLoc has Name,Url,ID(PK)
UmpSched has First,Second,Third,Plate,GameNo(FK),ID(PK)
The following query retrieves an Empty Set. However, I can query GameSched with GameLoc or GameSched with UmpSched and retrieve the appropriate records. I know I need a JOIN but am not sure about the syntax.
Any Suggestions?
$query_AllUmpGames = “SELECT GameSched.`Day`, GameSched.`Date`, GameSched.`Time`, GameSched.Division, GameSched.Home, GameSched.Visitor, GameSched.Location, GameSched.ID, GameLoc.`url`, UmpSched.Plate, UmpSched.First, UmpSched.Second, UmpSched.Third, UmpSched.GameNo FROM GameSched, diamonds, UmpSched WHERE ( UmpSched.GameNo = GameSched.ID ) && ( `GameSched`.`Location` LIKE `GameLoc`.`name` )”;