You are here: Re: Glitch in php or count() in mysql? « PHP SQL « IT news, forums, messages
Re: Glitch in php or count() in mysql?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация