i have it joined with
WHERE t.team_id = r.awayteam AND t.team_id = r.hometeam
i guess i just didnt update my post, but now i get no results at all
here are my tables
TABLE teams
team_id int(25) NOT NULL default '0',
location varchar(255) NOT NULL default '',
name varchar(255) NOT NULL default '',
pre varchar(255) NOT NULL default '',
wins int(25) NOT NULL default '0',
loses int(25) NOT NULL default '0',
PRIMARY KEY (team_id),
KEY team_id (team_id)
and
TABLE results (
id int(25) NOT NULL auto_increment,
week int(10) NOT NULL default '0',
email varchar(32) NOT NULL default '',
hometeam int(25) NOT NULL default '0',
awayteam int(25) NOT NULL default '0',
homescore int(25) NOT NULL default '0',
awayscore int(25) NOT NULL default '0',
qb1name varchar(32) NOT NULL default '',
qb1yards int(25) NOT NULL default '0',
hteamname varchar(25) default NULL,
ateamname varchar(25) default NULL,
PRIMARY KEY (id)
i want to be able to use the t.name to give me the names of the r.awayteam and r.hometeam...which is what i was trying to do with the code at the top