I have a calls which help me display json directly in html table.
I have a calls which help me display json directly in html table.
When to use Active Record is a common question among developers, Yii and overall.
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.
This article is for those who have dealt with the complexity of Elasticsearch or any other indexing machines and are looking for an easier way to index the existing database without additional effort.
For one of my projects I needed an interactive console command in Yii 1, i.e. the one that is gathering all information from user in an interactive mode (a serie of questions and answers displayed directly in the console), ignoring command-line arguments at all.
The export to excel function will affected by the final resorted columns in case you use my export grid to excel extends hzlexportgrid too, Since that export extention just depends on the grid columns configs, and that columns been customized by user themselves just now.
Just thought I would share this bash script I wrote to help automate a base install of YII on an Ubuntu server. This script does the following:
This article discusses how one can run a long task in background in yiiframework 1.1 using Ajax technique.
We can easily have a multilingual site if we put a "lang" parameter that comes via GET. For example:
In this article I will show you how to slightly increase application security, by exploiting the fact that Yii implements the Front Controller Pattern.
This behavior enable you to command the RBAC via console. This avoids you to install a entire rbac graphic toolkit to set up some rules in the rbac, maybe you are running inside a ssh console.
When one needs to select a record in a table that do not have related records through a relation, it is generally suggested to use a subquery. Personnaly, I prefer a high level approach, and I have a method to do it with scopes.
We probably have all used a virtual attribute (model function) to retrieve complex or related data for a CGridView column:
Finding good looking, working and not abandoned gallery manager for Yii 1.x application is a tough task. Out of all I found, only yii-gallery-manager extension looked promising. But, after downloading it, it turned out, that there are certain unusual things to do, to include it in your application. So, I decided to write this article...
Then, we write this in the config > main.php:
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.
I faced many issues when hosted our company website on AppFog.
MailGun.php Class
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.