Can I ask a question? Did you want the combination of the two columns together 
to be unique, or just the values within each column to be unique in that 
column? In other words, two separate unrelated unique indexes, or a single 
unique index comprised of both columns?

Jeremy Burns
Class Outfit

[email protected]
http://www.classoutfit.com

On 11 Dec 2010, at 07:23, John Maxim wrote:

> Oh, I didn't know it was sent to your email instead...
> 
> Yup it's fixed.
> 
> Thanks.
> 
> On Dec 11, 3:10 pm, Ryan Schmidt <[email protected]> wrote:
>> Great, glad you got it solved. (Sending this message back to the group so 
>> others know it's fixed.)
>> 
>> On Dec 11, 2010, at 01:06, John Maxim wrote:
>> 
>>> Thanks Ryan, I understand after you've pointed out with the UNIQUE
>>> column having 2 fields makes it a combination. It's solved by making 2
>>> different columns as UNIQUE each.
>> 
>>> On Dec 10, 4:34 pm, Ryan Schmidt <[email protected]> wrote:
>>>> 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

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

Reply via email to