Questions tagged [yii1.x]

Old version of PHP framework Yii.

Yii Framework

Yii is a generic Web programming framework, meaning that it can be used for developing all kinds of Web applications using PHP. Because of its component-based architecture and sophisticated caching support, it is especially suitable for developing large-scale applications such as portals, forums, content management systems (CMS), e-commerce projects, and so on.

Yii 1 is the first version of the Yii framework. Yii 1.0 was released in December 2008 and it is no longer supported. Yii 1.1 was released in January 2010 and reached the end of life in November 2015. Since then it only receives security bugfixes and fixes that improve compatibility with new versions of PHP. In October 2014 the successor of Yii 1.1 was released: .

Official documentation can be found in the Definitive Guide to Yii 1.1. Further important resources:

270 questions
0
votes
2 answers

Yii1 equivalent of the Sql query

I have this sql query SELECT * FROM form_fields WHERE id NOT IN ("3", "1", "6") ORDER BY FIELD (id, "3" ,"1" ,"6") which i want to convert to an yii1 query. So i tried like this $SQL="SELECT * FROM form_fields WHERE id NOT IN {$sorted_array} …
Bloodhound
  • 2,906
  • 11
  • 37
  • 71
0
votes
1 answer

How to Order a query

I have an array $sorted_array its value is Array ( [0] => 3 [1] => 1 [2] => 6 ) Now based on the $sorted_array i created an array $first_array = Yii::app()->db->createCommand() ->select('*') ->from('form_fields') …
Bloodhound
  • 2,906
  • 11
  • 37
  • 71
0
votes
1 answer

TypeError: $(…).modal is not a function in yii1

I have a button, when i clicked on it a modal popsup. Then i enter data and submit the form using ajax. After data is submitted i wanted the modal to close. This is what i tried (relevent code ) $form=$this->beginWidget('CActiveForm', array( …
Bloodhound
  • 2,906
  • 11
  • 37
  • 71
0
votes
0 answers

Yii1 Get options selected in dropdown when options has extra atrributes

When i add extra atrribute to options in CHtml::dropDownList(), i am not able to set options selected. Without adding extra atrribute to CHtml::dropDownList(), i am able to get an option selected and the code for this is echo…
Vikky
  • 43
  • 1
  • 7
0
votes
1 answer

Yii2 anFilterWhere with comma string

Suppose I have the data in table like this ID student_name score 1 ABC 1,3 2 DEF 11,2 3 GHI 5,2,13 score : is the string This is what I have tried $query->andFilterWhere(['like',…
Chhorn Soro
  • 3,061
  • 8
  • 27
  • 43
0
votes
0 answers

CDbException in www version of site with yii1.x and mssql

I am new to yii and have a site built in yii 1.1.x with 2 MSSQL2014 dbs one local and one residing in a remote server. I have used standard yii connection string in main.php as below: 'db'=>array( 'class'=>'CDbConnection', 'connectionString' =>…
0
votes
1 answer

using Yii CDateTimeParser to generate timestamp for the very end of the day (23:59:59)

I am using Yii's CDateTimeParser:parse function to generate a UNIX timestamp from a 'human UK date' $timestamp = CDateTimeParser::parse('29/10/2015', 'dd/MM/yyyy'); This works fine, however I need to also generate a second timestamp that will a…
Zabs
  • 13,852
  • 45
  • 173
  • 297
0
votes
1 answer

Submit form data using Ajax in Yii1

I tried to submit a form using ajax. Below is my code: controller code: public function actionIndex($complaint, $work) { ... $this->render('index',array( 'model' => $model, 'work_order' => …
Bloodhound
  • 2,906
  • 11
  • 37
  • 71
0
votes
2 answers

Adding a parameter to the url in a Yii AJAX call

I have a CHTML:ajax function that does some AJAX stuff on a select dropdown - I simply want to do something which says.. "on change, grab the selected value & pass that as param childID in the URL" This should then display the following in the url…
Zabs
  • 13,852
  • 45
  • 173
  • 297
-1
votes
1 answer

Yii1 - the config file is not loading

The main reason for not loading a config file in the server which worked well in localhost: Code Snippet from public_html/admin.php $yii = dirname(__FILE__) . '../framework/yii.php'; $config = dirname(__FILE__) .…
ersks
  • 1,409
  • 2
  • 16
  • 23
-1
votes
1 answer

Yii 1.1.16 'Property "User. password" is not defined when create user

I am working on a legacy application, and I am facing an error when I add a new user. Everything is ok when updating the user. The error is: [error] [exception.CException] exception 'CException' with message 'Property "User. password" is not…
Luai
  • 9
  • 1
-1
votes
1 answer

SQL query to yii 1.1 parameterized query

I have a long query that I need to parameterize in yii1.1. Can anybody help with it? $command = Yii::app()->db->createCommand("UPDATE visit LEFT JOIN card_generated ON card_generated.id = visit.card SET…
kritika555
  • 183
  • 1
  • 4
  • 15
-1
votes
1 answer

Yii1 - use array in the GridView column and push value in that array

I have following arrays outside GridView: $companyIDs = []; $companyNames = []; And following column: 'company_id' => [ 'name' => 'company_id', 'header' => 'Client', 'type' => 'raw', 'value' => function ($data, $row)…
Sasha
  • 8,521
  • 23
  • 91
  • 174
-1
votes
1 answer

How to convert this sql query to CDB criteria format on YII 1.1

I don't know how to convert this sql query to yii CDB criteria. please give me an idea to to do it. $sql="SELECT ICode,name,Date ,COUNT(*) AS tot, COUNT(case progress when '1' then 1 else null end) AS complete FROM invoice i LEFT JOIN…
-1
votes
1 answer

Can two databases be combined in the same view yii framework 1.1?

what's so? I have a question, I am beginning to learn yii 1.1. For work reasons I started with this version. My problem is this and I want to know if it is possible to do so. I have two different databases on the same server (localhost). What I…
Gabo MDA
  • 13
  • 4
1 2 3
17
18