How to prevent duplicate records?

Hi guys ,

when we register with yii framework,in that registeration page of yii framework forum,it is displaying username exists or not…like that how to check databse and ajax or jquery .Please post sample code and help me …

Thanks in advance


Hello. You can use a unique validator in your model rules :

[color="#008000"]NOTE: moved to proper section (General Discussion for Yii 1.1.x instead of Feature requests)[/color]