You are here: Re: I'm confused « All PHP « IT news, forums, messages
Re: I'm confused

Posted by J.O. Aho on 08/17/06 14:50

_Raven wrote:
> I am getting an error when adding info to table. I am getting mysql error
> for duplicate entry.

You aren't giving any info on how your table looks like, so it's a bit more
guessing here.

I would use AUTO_INCREMENT for the uid column, this way you don't have to
inject it when you add a new user to your table.

INSERT INTO mytable (name,state) VALUES ('joe','texas')


> The column is a unique one, but the data I'm inserting is unique from the
> other entries.

Are all columns unique? then you limit quite much what you can enter into your
table, only the uid should be unique and a primary key.



//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

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