| Article: |
Ten MySQL Best Practices | |
| Subject: | Alternative to point number 6 | |
| Date: | 2005-01-07 00:09:26 | |
| From: | Tony Marston | |
|
Instead of using an AUTO_INCREMENT column the method I have used for years, and which works on all RDBMS systems, is as follows:
|
||
Showing messages 1 through 1 of 1.
-
Alternative to point number 6
2008-01-27 17:33:21 zhalbrecht [View]
Oh no. no. no no no no no. Please don't do this. How are you guaranteeing that someone else won't do the same thing at the same time? Think the chances of that are so small you'll never have to worry? Start worrying. As someone who has had to fix this kind of issue let me assure you that problems will occur. You've made no mention of transactions and even at that point wrapping your own INSERTs in transactions manually, you really are reinventing the wheel.


