Month: October 2013

Yii Create Module using CRUD step by Step

Firstly create a module using Gii
screenshot_76I think this might be helpful how to create CRUD for modules in Yii.How to use Yii framework in modules

Create a table in database
"CREATE TABLE oow(id INTEGER PRIMARY KEY NOT NULL, serial_number TEXT, model_number TEXT, mdel_range TEXT, notes TEXT, created DATETIME ,modified DATETIME, createdby INTEGER, modifiedy INTEGER )"

Next Create Model for your table in moudule you just created. Make sure to change the model path to application.modules.YOURMODULENAME.models and click on Generate

Last thing is to create the CRUD
Make sure you give model class name as
else it will give error as model not found while creating CRUD


You can now run your moudule as

If you are using SEO friendly URLs you probably need to change code as per your main.php in config folder

I hope this will help you


Migration of data with special charecters

I have been doing lots of migration from the past couple of years and every time I try to ship the data from one source to next, teh special charecters are the major hurdle.

There is been a helpful website

However the most beneficial method I found was the function urlencode and decode as while shipping the data you can encode it and while retriving you can decode it

There have been other methods too screenshot_75