mysql id
#1

The ID of the first car in MYSQL table should be 1.. the second car's ID should be 2 in mysql and so on and on.. how to do this?
Reply
#2

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.
Reply
#3

How should I do that? Not familiar with mySQL.
Reply
#4

I don't understand. You want to make that: The first car created, is id 0, the second 2 etc..?
So like players?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)