Permalink
Browse files

Fixed table column names in query in SortableAction

  • Loading branch information...
magefad committed Oct 26, 2012
1 parent c5f3de1 commit f4d1000a1926e12653ed1c06b6e1e5a508e2a0b5
Showing with 1 addition and 1 deletion.
  1. +1 −1 actions/TbSortableAction.php
@@ -39,7 +39,7 @@ public function run()
$query .= "WHEN {$model->tableSchema->primaryKey}={$id} THEN {$sort_order} ";
$ids[] = $id;
}
- $query .= "END WHERE {$sortableAttribute} IN (" . implode(',', $ids) . ');';
+ $query .= "END WHERE {$model->tableSchema->primaryKey} IN (" . implode(',', $ids) . ');';
Yii::app()->db->createCommand($query)->execute();
} else {
throw new CHttpException(500, Yii::t('yii', 'Your request is invalid.'));

0 comments on commit f4d1000

Please sign in to comment.