How to connect to the database?

Answer

Most of the web applications are assisted by databases. test-drive application is not an exception. For database, we need to see the application where and how to connect it. This is done through the application configuration file WebRoot/testdrive/protected/config/main.php, the following code represent the connectivity to the database,
return array(
……
‘components’=>array(
……
‘db’=>array(
‘connectionString’=>’sqlite:protected/data/testdrive.db’,
),
),
……
);

All yii Questions

Ask your interview questions on yii

Write Your comment or Questions if you want the answers on yii from yii Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---