$criteria = new CDbCriteria();
$criteria->select = array(
'CASE
when userid is not null then userid
end
as A',
'CASE
when userid is not null then \'D\'
end
as H');
$result = MyModel::model()->findAll($criteria);
when i foreach the $result, am getting objects in each of those results and I can only get the actual table column like e.g
$obj->USERID
I want to get the alias that i used in the select statement like e.g
$obj->A OR $obj->H
but if I do that, am getting an error, because A and H are not properties of the MyModel
is it possible to get the "as" names as table columns from the result of the findAll?, if so, how?
good luck with that you probably have to roll your own pagination and stuff, try and look for an extension if you interacting with elastic make you life easier