Introduction
Introduction
Lately, i needed to deal with the following scenario: read from two databases (db1,db2), and write to a third database (db3).
Hi friends,
I recently worked on updating the content of a gridview based on the selection of a dropdown menu. I thought I should share it in the forum...
// In Yii 1.x $form = $this->beginWidget('CActiveForm', [
'id' => 'order-search-form',
'method' => 'get',
]);
echo $form->textInput($searchModel, 'id');
echo CHtml::submitButton('Find', ['class' => 'btn btn-primary']);
$this->endWidget();
`
This topic is related with langhandler extension
There are cases that you want to make an ajax request to another server and get the results.
Generally we need to show one or more fields from a model that is related to another model used in CGridView. For our case we will use two related models, which explain how to use model "A" fields in a CGridView that used model "B".
Yii has a neat "trick" that will assign default values to new CActiveRecords. When performing a search() though, this is pretty annoying as they automatically apply as filter values.
Efficient coding with Yii implies efficient use of the code generator. This article shares the personalised Gii templates that were built starting from the standard templates proposed by AweGen.
There are cases that model validators should be depended by controller/action and you couldn't manipulate on the model class or using scenarios in easy way
Modern browsers support SVG, older browsers do not. This replacement for CHtml::image() allows you to handle to propose SVG in an efficient way with PNG as a fallback.
yii rights some tips..
Your application is international and you have to select the best language for the user. Your user may have selected 'fr_CA' and you have 'fr_FR' or 'fr' available. What do you do? Here is a tip.
I faced many issues when hosted our company website on AppFog.
The usual way to find out what Yii has created for an SQL query is to mutilate the SQL in the sourcecode and call the program again so that the SQL statement with errors is displayed. Or you can use the SQL logger, which must be switched on and off each time and logs all SQL statements, which leads to an enormous slowdown in program execution and decelerates your workflow.
I have a calls which help me display json directly in html table.