Click here for EduSec Demo EduSec Screenshots
Displaying 26-30 of 32 result(s).

Creating a dependent dropdown

On 2013-06-10 - By Ravi Thanki

Often you'll need a form with two dropdowns, and one dropdown's values will be dependent on the value of the other dropdown. Using Yii's built-in AJAX functionality you can create such a dropdown.


The view with the form.

echo CHtml::dropDownList(‘country_id’,”, array(1=>’...

Remove index.php in Yii

On 2013-06-10 - By Ravi Thanki

1) Make sure that Apache’s Rewrite Module is enabled.

It can be enabled using a2enmod command:
$ sudo a2enmod rewrite

Then restart Apache like:

root@Roopz-PC:~# /etc/init.d/apache2 restart

2) Set Apache’s ‘AllowOverride’ to ‘ALL’

In my case, I am using virtualhost, so that’s the file I ne...

Find data from database using findByPk() method in yiiframework

On 2013-06-10 - By Ravi Thanki

$var = Model name::model()->findByPk(2);
echo $var->name;

Here “2″ is a PK and “Model Name” is a name of model.
when “echo $->any_variable->name” is executed then display name base of pk.

Findall Example


Reading Record from database in yii

On 2013-06-10 - By Ravi Thanki

// find the first row satisfying the specified condition
// find the row with the specified primary key
// find the row with the specified attribute values

Change your gii default crud generator,Make a new as per your requirement

On 2013-06-10 - By Abhishek Shah

If you want to apply your new template for default gii crud generator,want to make your own gii crud,than follow the steps:
In your application,if you go to gii,you are seeing all generatoers on index.

You will get it from framework/gii/views/index.php
Here ,if you want to add any other type of generator,You can make it easily.

See framework/gii/generato...