18.05.2012, 16:35
Using MySQL's AUTO_INCREMENT.
Also, I don't recommend relying on the database vehicle IDs very much because you might want to delete some vehicles from the database at one point and so on. In such cases, an empty ID will be left, so the IDs can go like 1 - 2 - 4, or similar.
Store the vehicle's database ID in an array instead.
Also, I don't recommend relying on the database vehicle IDs very much because you might want to delete some vehicles from the database at one point and so on. In such cases, an empty ID will be left, so the IDs can go like 1 - 2 - 4, or similar.
Store the vehicle's database ID in an array instead.