Yii Sqlite Tutorials

Yii Database Connection

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 »