To use the database we have to configure the database connection component by adding 'db' information to application config/main.php file... Read More »
To use the database we have to configure the database connection component by adding 'db' information to application config/main.php file... Read More »
Most Web applications have the databases. We have to configure the database details in protected/cofig/main.php to use the database. Here i explained with two types of database connectivity. They are application configuration connection, CDbConnection .Application Configuration (config/main.php)Sqlite DatabaseTo connect the sqlite db with application, we need the directory details of database. 'db'=>array( 'connectionString' => 'sqlite:'.dirname(__FILE__).'/../data/testdrive.db', ), Mysql DatabaseTo connect the mysql db with application, we need the hosting details, database […]... Read More »