This is my php code and database.. for some reason $id is showen twice.... any idea why???
<?php
$result4 = mysql_query ("SELECT * from results_bye b, results_group g where b.group_id = 1 and b.comp_run_id = $comp_run_id and g.regular = '0' and b.game_played = '1'");
while ($row4 = mysql_fetch_array($result4)) {
$id = $row4["team_id"];
echo $id;
?>
<p>
<?php
}
?>
THis is my sql
CREATE TABLE results_bye (
group_id int(10) NOT NULL default '0',
comp_run_id int(10) NOT NULL default '0',
team_id int(10) NOT NULL default '0',
bye_desc varchar(40) NOT NULL default '',
game_played int(10) NOT NULL default '0',
KEY group_id (group_id)
) TYPE=MyISAM;
#
Dumping data for table results_bye
#
INSERT INTO results_bye VALUES (2, 1, 2, 'BYE 2', 1);
INSERT INTO results_bye VALUES (2, 1, 3, 'bYE 1', 1);
INSERT INTO results_bye VALUES (1, 1, 3, 'Test bye', 1);