Re: Glitch in php or count() in mysql?
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
|