Unique Attribute

hi all,

i had two attributes in a table ,Group_Name and User_Name,user in one group cant be added to another group ,for this i hav to check the uniqueness of user name in the group choosen ,how can i do this?

thanks in advance :rolleyes:

this is standard case of validating uniqness of multiple column combination.

try to use validator like this one: http://www.yiiframework.com/extension/unique-multiple-columns-validate/

Thank u ,done :)