Trouble with SELECT/UPDATE from multiple tables
I wonder if anyone can help me.
I am creating a league management system and up to the point of creating a form to display all fixtures in the database with inputs allowing scores to be entered.
The fixtures are stored using the teamIDs of the teams in the fixture table which is realted to the teamID in the team table.
I have a join query which correctly displays the team names rather than their IDs for the user, however when displaying the teamIDs both the teams for one fixture share the same ID (I know for a fact that The Southfield is teamID 1 and Myton is teamID 3 E.g.
teamID | teamA | teamAScore | - | teamBScore | teamB | teamID
1 The Southfield 4 - 1 Myton 1
This doesn't make too much sense to me and I wondered if anyone could help as I think this is hindering my ability to update the table in the database as I can't supply it with one given ID, unless this is combatted in the update query itself..
So if anyone could look at the code and see where I have gone wrong and perhaps point me in the direction for updating the table too that would be great! (Just a quick note on updating, when you hit submit it does absolutely nothing...)
Once I get this sorted I then need to move on to using the update query to update the team in the league_table table based on their ID - I'll no doubt run into more problems!
All help would be appreciated.
Thanks in advance.
N.B. I don't have an online version of this, I am working locally using XAMPP.
I realise that for updating it I need to include the fixtureID so that I can use the fixtureID in the where cluase, however, I still need the correct teamIDs so that also when I update I can update the leaguetable table.
|All times are GMT +1. The time now is 04:48 AM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.