1. What type of table / field should I use?
-> The type of table depends on what you have planned for your application. It could be Innodb or Myisam. I suggest you use a numeric column so that you can increase / decrease them. DO NOT do this UNKNOWN if you plan to allow negative numbers.
Here are some limits you might find useful when declaring a column length:
TINYINT (length) - 1 - Integer with unsigned range of 0-255 and a signed range from -128-127 SMALLINT (length) - 2 - Integer with unsigned range of 0-65535 and a signed range from -32768-32767 MEDIUMINT(length) - 3 - Integer with unsigned range of 0-16777215 and a signed range from -8388608-8388607 INT(length) - 4 - Integer with unsigned range of 0-429467295 and a signed range from -2147483648-2147483647 BIGINT(length) - 8 - Integer with unsigned range of 0-18446744 and a signed range from -9223372036854775808-9223372036854775807
2. Is there a minimum version of MySQL that I should use?
-> Just use auto increment? You make good use of the latest version. I suggest something> 5.2.4 if possible.
3. What is the sql code for this, a safe transaction for MySQL?
-> Sorry, there is currently no answer.
Devner Jan 9 '10 at 14:18 2010-01-09 14:18
source share