04.08.2015, 23:11
Okay, so I was wondering if this would be possible.
Say I have a vehicle table and a player table. The player table stores the players vehicle key (id), and the vehicle table stores the id (players key).
What I'm wanting to do is set up a relation view for the vehicles & players table so that when I delete a vehicle from the database, I would send the following query;
So that the vehicle id's are still in order.
What currently happens is the players vehicle keys get mixed up cause of the last query I send.
Say I have a vehicle table and a player table. The player table stores the players vehicle key (id), and the vehicle table stores the id (players key).
What I'm wanting to do is set up a relation view for the vehicles & players table so that when I delete a vehicle from the database, I would send the following query;
Код:
SELECT MAX(`ID`) FROM `server_vehicles` ALTER TABLE `server_vehicles` AUTO_INCREMENT = MAX(`ID`);
What currently happens is the players vehicle keys get mixed up cause of the last query I send.