You are here: Re: on input form showing error message for duplicate entry. « All PHP « IT news, forums, messages
Re: on input form showing error message for duplicate entry.

Posted by Steve on 10/17/06 20:13

"Breklin" <breklin@sbcglobal.net> wrote in message
news:DFaZg.637$T_1.357@newssvr14.news.prodigy.com...
|I think the id should be an auto_increment and then she should have a
| second field with an index on it for the product code. this would surely
| avoid duplicate records.

again, unless SHE is assigning product id's they will *rarely* be integers
that can auto-increment. if the user is specifying the product id, then
showing the user the failed sql error message is less than elegant.
especially if she can look up the id first, before trying to perform the
insert. i gave an example early in the thread of how all this can be handled
without php thrown errors.

the auto-incremented id is great and should be on every table as a rule of
thumb. but again, this does NOTHING to solve her problem of duplicate data
based on produce code/id. again, i gave an example.

cheers.

 

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

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