I've set up the "testdrive" application using the Definitive Guide (yii-guide-1.0.0.pdf). I've encountered a problem when trying the CRUD command using the Yii Interactive Tool v1.0, (i.e. when using "crud User" command).
However, when using the "model User" command, I do not encounter any problem and the model was created successfully.
Error message:
Error: Table "User" does not have a primary key
Primary key was set on the said table:
CREATE TABLE user
(
id
int(11) NOT NULL auto_increment,
username
varchar(128) NOT NULL,
password
varchar(128) NOT NULL,
email
varchar(128) NOT NULL,
PRIMARY KEY (id
)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
I have tried both using either MyISAM, InnoDB engine.
Any help would be GREATLY appreciated.
Thanks.
My development environment is as the following:
Wampserver 2.0
Apache Version : 2.2.8
PHP Version : 5.2.6
Loaded Extensions :
* bcmath
* calendar
* com_dotnet
* ctype
* session
* filter
* ftp
* hash
* iconv
* json
* odbc
* pcre
* Reflection
* date
* libxml
* standard
* tokenizer
* zlib
* SimpleXML
* dom
* SPL
* wddx
* xml
* xmlreader
* xmlwriter
* apache2handler
* gd
* mbstring
* mysql
* mysqli
* PDO
* pdo_mysql
* soap
* SQLite
MySQL Version : 5.0.51b