I am totally beginners to yii framework and sharing my yii code and methods that worked for me.So yii is very easy and flexible to learn and write web application.
To start gii tool set the password for the gii in the file location
'modules'=>array( // uncomment the following to enable the Gii tool 'gii'=>array( 'class'=>'system.gii.GiiModule', 'password'=>'123', // If removed, Gii defaults to localhost only. Edit carefully to taste. 'ipFilters'=>array('127.0.0.1','::1'), ), ),
The gii as already testdriver.db which as default login table configured in main.php file located in
'db'=>array( 'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db', ),
To connect gii generator to existing database the following code should be uncomment the code in the file main.php.
'db'=>array( 'connectionString' => 'mysql:host=localhost;dbname=mydb', 'emulatePrepare' => true, 'username' => '', 'password' => '', 'charset' => 'utf8', ),
To acces the gii page in browser