22.05.2017, 15:28
That's normal. Auto-generated ID's do not get reset or reused. And with reason. For example, this very topic has id 634613 in the database. If it gets deleted then that ID does not get re-used. If it did get reused then all existing links to it would suddenly point to another topic. If you want to start from scratch you should use TRUNCATE TABLE. This deletes all the data and it also resets the auto-increment id. However I don't believe truncate will work if there are foreign keys.
Why? That's extremely counter intuitive. You already have the data so why (again) do you need to query for it?
Also what's the deal with prefixing variables with "i"? When I see "i" in front of a variable I think "integer". This makes your code a bitch to read because none of those variables are integers.
Quote:
Once this has finished querying, I then send a new query to the database, getting the data from it and then spawning the vehicle.
|
Also what's the deal with prefixing variables with "i"? When I see "i" in front of a variable I think "integer". This makes your code a bitch to read because none of those variables are integers.