There are two problems :) First is that adding KEY ('name') add only indexing key and not unique, so will not help.
Second one is that it is very hard to find where you do yor modifications in sql :) Please, try to add diff next time, I think it is better to understand. But there is very easy solution for this problem. Firstly, we must change type of name column to varchar instead of text. I think that text is too big for such value and we cannot make unique on it. Then: ALTER TABLE `contacts` ADD UNIQUE (`owner` , `name`) so there will be unique key from owner and name and i think it is what you want. Of course, as you said, there had to be error handling on application side. Út, led 03, 2006 ve 10:55:30 +0100, Martin Waschbüsch napsal: > Hm, of course making name unique means that only one user can have that > entry, which is nonsense. (Sorry!) > In that case I guess we will have to check for double entries when > adding/importing. > > Martin ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ Ilohamail-devel mailing list Ilohamail-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ilohamail-devel