Skip to content

Commit

Permalink
Fixed issue #13440: Quota, Postgress cant add
Browse files Browse the repository at this point in the history
Dev: NEVER use backticks in SQL code!
  • Loading branch information
lacrioque committed Mar 6, 2018
1 parent 63511c1 commit c23544f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/models/Survey.php
Expand Up @@ -1763,7 +1763,7 @@ private function getQuestionOrderCriteria()
);
$criteria->order = Yii::app()->db->quoteColumnName('groups.group_order').','
.Yii::app()->db->quoteColumnName('t.question_order');
$criteria->addCondition('`groups`.`gid` =`t`.`gid`', 'AND');

This comment has been minimized.

Copy link
@lacrioque

lacrioque Mar 6, 2018

Author Contributor

@TonisOrmisson please be careful to always push SQL code that is compatible to postgresql and MSSQL as well!

$criteria->addCondition('groups.gid=t.gid', 'AND');
return $criteria;

}
Expand Down

2 comments on commit c23544f

@dawidmo
Copy link

@dawidmo dawidmo commented on c23544f Mar 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works. Thank You - for very fast answer/solution.

@lacrioque
Copy link
Contributor Author

@lacrioque lacrioque commented on c23544f Mar 7, 2018 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.