Quantcast
Channel: Yii Framework Forum
Viewing all articles
Browse latest Browse all 18717

Sql Power Syntax Collision In Yii Select

$
0
0
Hello everybody

I am getting the error message
"Active record "Entries" is trying to select an invalid column "POWER(5". Note, the column must exist in the table or be an expression with alias."
with this Code:

$dataProvider = new CActiveDataProvider('Entries', array(

	'criteria'=>array(
		'select' => 't.*, POWER(5, 2) AS test',
		'with'=>array('userm'),
		

		
	),
	'pagination'=>array('pageSize' => 30,)
));

$this->render('index',array(
	'dataProvider'=>$dataProvider,
));

I am pretty sure the problem is the "," within POWER
However, if I remove "'with'=>array('userm'), " it somehow works.

Does anybody know how to solve this?

Viewing all articles
Browse latest Browse all 18717

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>