CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]

I'm working with yii users and rights and following this link, http://www.yiiframework.com/wiki/423/installing-yii-users-and-rights-to-newly-created-yii-app/

I have applied all the things mentioned in this link, but when i type the url localhost/webapp/user/login it asks me to login. Upon login i get this error :

CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'field list'. The SQL statement executed was: SELECT id, username, email, createtime, lastvisit, superuser, status, password, activkey FROM user t WHERE t . username =:yp0 LIMIT 1

Please help me with this..!!


make sure you have a column "id" in the user table. In Yii, id is the default primary key as well

链接地址: http://www.djcxy.com/p/60860.html

上一篇: 创建.tar.gz文件时不包括目录

下一篇: CDbCommand无法执行SQL语句:SQLSTATE [42S22]