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.
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.
I recently built a tarpit for bad bots.
From: http://lacot.org/ and me.
Suppose you want to refresh a form or any content when a single row of CGridView is selected
In SQL, wildcard characters can be used in "LIKE" expressions; the percent sign (%) matches zero or more characters, and underscore (_) a single character. Sometimes users are not familiar with these or they are using different ones like (*) and (+) similar to regular expressions. My colleages do so and then i decided to add this feature by extending CbCriteria. Especially adding a new parameter $...
Lets say we have 3 modules (customer, user, admin) in an application and we need, separate logins for each module.
var formData = new FormData($("#post-form")[0]);
$.ajax({
url: '<?php echo Yii::app()->createUrl("forumPost/uploadPost"); ?>',
type: 'POST',
data: formData,
datatype:'json',
// as...
If you develop your Yii project on both Windows and Mac, there can be a problem setting up the configuration unless the configurations for both system are identical. On my machines I have the following configurations:
I needed all messages with their translation into javascript. This is my solution:
Please, note. This article is entirely based on a work done by me colleague developer, who hasn't got account on this webpage and also hasn't got time for writing this article. I'm writing it for him. I will try to forward him any comments that may appear, but can't assure if/when he'll be able to answer. I'm far, far less experienced in Oracle therefore I won't probably be able to help myself.
There came the need to perform two operations, always, on 'application boot' time. Example? My real world example involved some geo-location logic (that's the first operation) and syncing of some session details so KcFinder can be in sync with the user in context - each user with his own session container (the second).
Language translation is a common requirement in multi lingual sites. In Yii, we can translate using message and view translation.
While rewriting the PcReportContent extension I'm maintaining I've bumped to a challenge. This wiki was born out of it.
The classic Yii way for doing an update action is as follows:
This wiki shows about how to make a custom column or how to pass php-Yii-html code in CButtonColumn (as a button)
My goal here is to Open bootstrap modal and load ANY content using ajax response.
<?php $this->widget('zii.widgets.grid.CGridView', array(
'dataProvider' => $dataprovider,
'id'=>'recipient_table',
'selectionChanged'=>'updateEditForm',
'columns' => array(
'rec_id',
'org.nachname',
'org.vorname',
'org_id',
array(
'class'=>'CButtonColumn',
'template'=>'{...
>Info: As KCFinder's documentation mentions, if your application (Yii in our case) session handling is using the PHP environment configuration - meaning no change in session handling at all, then no change is needed also on KCFinder side to be able to use this session and thus have this simple interface between your Yii webapp and KCFinder. If t...
hello guys now i am going to show you how to Reuse File Upload Code across multiple projects.