Questions tagged [yii-components]

Yii is an open source, object-oriented, component-based MVC PHP web application framework. Yii is pronounced as "Yee" or [ji:] and it's an acronym for "Yes It Is!"

For more information on Yii components, please see the Yii documentation at:

http://www.yiiframework.com/doc/guide/1.1/en/basics.component

434 questions
0
votes
4 answers

get data from db using an array in yii

Im new to yii. my problem is, I have an array $hometeamid which contains all the id that i need to display details. How can i get the data. plz somebody help me I have tried $mod = Yii::app()->db->createCommand('SELECT * FROM event WHERE id =…
Salini L
  • 829
  • 5
  • 15
  • 43
0
votes
0 answers

YumUserController not found Yii

hi i am running someone Else's code based on Yii.I tried to run it but i found the error. Fatal error: Class 'YumUserController' not found in C:\wamp\www\msl\framework\YiiBase.php on line 204And also it displays html/php content,can any one please…
anujayk
  • 544
  • 7
  • 31
0
votes
1 answer

Yii trigger component event from controller action

I'm trying to create a method where I can trigger an event from a controller action (sending parameters with it), and have multiple components (in the same, or in another module) to listen that trigger and execute some random code (maybe some…
MGP
  • 653
  • 1
  • 14
  • 33
0
votes
2 answers

Yii Framework: setPathOfAlias() returns null

I am trying to put MaxMind's GeoIp2 into my Yii application. Basically, I copied the files under "src" (see previous link) under protected -> vendors -> maxmind. The folder structure under my application is the following: protected |---- vendors …
Comforse
  • 2,027
  • 4
  • 25
  • 40
0
votes
1 answer

Grid View Fetches all records in Yii

I am new to Yii. I have did a normal query operation by fixing a criteria in my action. My Grid view fetches particular records from the criteria query, but if I click on second page, it displays all the records again. Please help me in this. I have…
0
votes
2 answers

Writting query using CDbcriteria for CgridView in YII.?

I am trying to show my data in gridview and in process have written the following query which I am trying to write using CDBCriteria, //query SELECT user. * , jobs. * , COUNT( jobs.user_id ) FROM user INNER JOIN jobs ON user.id =…
saji
  • 201
  • 1
  • 5
  • 19
0
votes
2 answers

Using Multiple Database Connection Not Working For Extension

I am doing multiple database connection using the tutorial at http://www.yiiframework.com/wiki/544/multiple-database-connection-select-database-based-on-login-user-id-dynamic/ . The code is working fine in the model. But the problem is I am using an…
Akhilesh
  • 1,243
  • 4
  • 16
  • 49
0
votes
2 answers

How to change translate yii file (messages) path?

I have a project with a few Yii-applications in it. And i want to use one messages (translate) file for some applications, how can i change config file?
Alex
  • 8,055
  • 7
  • 39
  • 61
0
votes
1 answer

How to render a view from an action class

Let I've written the following action class: class TranAction extends CAction{ public function run(){ echo "Hello Yii"; } } Now I want to render myView view, but I dont know how can I invoke controller's render() method from run()…
user2953119
0
votes
0 answers

save unrelated model within controller in yii

In my post controller, I saved comment and it worked perfectly. Now I want to save a record in a summary table. When I save the record, I systematically, get the error going to the else option. Do I need to do something more? Thank you for your…
trinocle
  • 55
  • 2
  • 10
0
votes
2 answers

Retreving specific row from database in yii

I am working on a job site,And want to show only the jobs posted by a particular user in cgridview.My actuall aim is to authenticate the user so that only jobs posted by him/her will be visible in cgridview.I have done the following stuff,but not…
saji
  • 201
  • 1
  • 5
  • 19
0
votes
1 answer

Get id of selected values in CAutoComplete in Yii

I am using CAutoComplete to select multiple comma separated values. Now I am able to pass only the selected values, I need to pass the id of selected values also when the form is submitted. Can you please help me to send the id on submit as an array…
anu
  • 458
  • 2
  • 13
  • 36
0
votes
2 answers

How to Display the Text contents of a text file in yii?

I am trying to display the contents of a text file inside a div in my view. I found that in php this code can be used…
anu
  • 458
  • 2
  • 13
  • 36
0
votes
2 answers

Yii : data is not passed to view

Having this widget class: class ValuesSetWidget extends CWidget { public $id = null; public $listHtmlOptions = array(); public $addDivClasses = ""; public $model; public $attribute; public $name; public $value; public function init() { …
Luis Masuelli
  • 12,079
  • 10
  • 49
  • 87
0
votes
2 answers

Yii CActiveDataProvider returns wrong data

I'm using 2 tables with 1 to many relation: campaign and group This code returns only the relevant campaigns in the group. $models = Campaigns::model()->with(array( 'Campgroupassoc' => array('condition' => "groupid=$id"), …
Danny Valariola
  • 1,118
  • 5
  • 26
  • 41