Simple Yii Script for performing CRUD operations:
Simple Yii Script for performing CRUD operations:
One of the common tasks the web application might be required to perform, especially the app using some kind of a CMS, is to save the history of data changes. Your client for sure will want the answer to this simple question - If I mess this up or delete by accident can we bring it back? Well, DB backup is one thing and quick recovery is another - let's talk about latter one.
According to below wiki we could migrate database schema to another database
To extend further static pages as shown by Qiang http://www.yiiframework.com/wiki/22/how-to-display-static-pages-in-yii/ here're the steps to take:
This is a tutorial for how to auto set model values without any code.
Add these lines in /config/main.php
'components'=>array(
.........
'db'=>array(
'connectionString' => 'mysql:host=localhost;dbname=database1',
'emulatePrepare' => true,
'username' => 'root',
'password' => 'itsasecret',
'charset' => 'utf8',
),
'db2'=>array(
'class' => 'CDbConnection',
'connectionString' => 'mysql:host=localhost;dbname=databa...