Hi I am trying to query a table in my database, basically I need to select the driver_id from the table where the team_id is the same as the users driver id, stored in a variable $user_driver_one. So pretty much selecting the other driver with the same team_id.
column driver_id 1 2 3 4 5 6 7 8 9 10
column team_id 3 3 2 2 1 1 4 4 5 5
So the user could have $user_driver_one = 4, so I need to select in a query the driver_id = 3, as driver_id 3 has the same team_id.
I am having problems with this, any help is much appreciated.