Posted by J.O. Aho on 10/23/05 17:35
Tony Marston wrote:
> You should be using 'select max(msg_id) from messagesdb;' instead of 'select
> count(*) from messagesdb'. In this way it will not matter if any previous
> entries get deleted.
This can still generate doublets of msgid as the select statment can be
trigged by two different people trying to add something,
AUTO_INCREMENT UNIQUE should in most cases be used for ID (numerial) columns.
//Aho
Navigation:
[Reply to this message]
|