$request = mysql_query("
SELECT g.id_games,g.id_seasons,g.id_sports,g.opponent,g.result,g.comments,g.gamedate,
g.placed,g.totalteams,g.ourscore,g.opponentscore,se.year,sp.title,sp.level,sp.gender, sp.id_type
FROM {$db_prefix}games AS g, {$db_prefix}seasons AS se, {$db_prefix}sports AS sp
WHERE (g.id_sports=sp.id_sports=se.id_sports) AND (g.id_seasons=$season) ORDER BY g.id_games DESC");
That query is producing double results. What the heck? Anyone have a clue whats going on here?
$db_prefix="jfk";
$sport=1;
$season=1;
Table structures
CREATE TABLE jfk_games (
id_games int(10) unsigned NOT NULL auto_increment,
id_seasons int(10) unsigned NOT NULL default '0',
id_sports int(10) unsigned NOT NULL default '0',
opponent tinytext NOT NULL,
result tinyint(1) NOT NULL default '0',
comments int(10) unsigned NOT NULL default '0',
gamecomments longtext NOT NULL,
gamelocation tinytext NOT NULL,
gamedate int(11) NOT NULL default '0',
placed int(10) unsigned NOT NULL default '0',
totalteams int(10) unsigned NOT NULL default '0',
ourscore tinytext NOT NULL,
opponentscore tinytext NOT NULL,
gamestats longtext NOT NULL,
PRIMARY KEY (id_games),
KEY id_sports (id_sports)
) TYPE=MyISAM;
CREATE TABLE jfk_seasons (
id_seasons int(10) unsigned NOT NULL auto_increment,
id_sports int(10) unsigned NOT NULL default '0',
year int(10) unsigned NOT NULL default '0',
comments int(10) unsigned NOT NULL default '0',
body longtext NOT NULL,
PRIMARY KEY (id_seasons),
KEY id_sports (id_sports)
) TYPE=MyISAM;
CREATE TABLE jfk_sports (
id_sports int(10) unsigned NOT NULL auto_increment,
id_type int(10) unsigned NOT NULL default '1',
title tinytext NOT NULL,
gender tinyint(1) NOT NULL default '0',
level tinyint(1) NOT NULL default '0',
body longtext NOT NULL,
PRIMARY KEY (id_sports)
) TYPE=MyISAM;
Thanks!