New user IDs - use MAX() or auto increment?
Posted 15 July 2006 - 02:59 PM
Posted 15 July 2006 - 03:46 PM
Posted 16 July 2006 - 07:26 AM
Then should I use an InnoDB table (and then use transactions?) I mean... is there any advantage to that (why does't everybody use auto_increment?)
UID fields should always be auto-increment.. MAX() is unreliable, because you don't have consistent reads in MySQL with MyISAM table without transactions, so you can't be sure that you're adding one to the "last" record. Auto-incrementing is always appropriate for uids; sometime count=count+1 makes sense for other fields, but the same warning applies.
Posted 17 July 2006 - 11:22 AM
(pardon my ignorance... if you have any decent tutorials on this kind of thing, please point me to the url)
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users