On Dec 10, 2010, at 02:07, John Maxim wrote: > Hi guys can you help explain why the unique key for mine doesn't > work ? I set username and email as UNIQUE but I tried entering another > registration with a different username, but same email it went through > the registration and added on MySQL database table.... that means my > UNIQUE key not working properly huh ?....
> More info, I have checked on phpmyadmin that both the username and > email are in the UNIQUE column. This last sentence may indicate the problem. Do you mean that you have a single UNIQUE index over both the username and email fields? If so, that only means that the *combination* of username and email must be unique. If you want the username to be unique, and the email to be unique, independent of one another (and you probably do), then you need two UNIQUE indexes: one on the username field and another on the email field. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
