Hello,
I really need some support to correct this query for me.
I added 2 tables to the 4images database.
TEAMS (teams_id, teams_name,....)
&
RESULTS (results_id, results_home, results_out, .....)
In my additional page results.php I have this information:
Barcelona vs
Dynamo Moscow 5 -
5The problem is that I cannot get the value of the
teams_id (When you click on the name the team)
I am using this query, but I still not have the teams_id:
$sql = "SELECT r.results_id, r.results_home, r.results_out, r.results_goals_home, r.results_goals_out, r.results_done, t.teams_id, t.teams_name
FROM (".TEAMS_TABLE." t)
LEFT JOIN ".RESULTS_TABLE." r ON r.results_home = t.teams_name
GROUP BY r.results_id
ORDER BY r.results_id ASC";
$result = $site_db->query($sql);
$num_rows = $site_db->get_numrows($result);
I really tries everything, but....
I believe there is something wrong with the
LEFT JOIN.