Reputation: 20444
Is there a certain type of SQL field that acts as a sequential number increasing by 1 each time a row is added.
If not how do we find the highest number of a column with a PHP mySQL query and then increase it by 1.
Upvotes: 0
Views: 432
Reputation: 55271
Yes, http://dev.mysql.com/doc/refman/5.6/en/example-auto-increment.html
Upvotes: 2
Reputation: 291
You can make a field in a MySQL database increase by 1 for every new row by enabling the AUTO_INCREMENT
flag. This is a very common (and very good) practice with identifiers within tables.
Upvotes: 1