schmunk
(Schmunk)
1
Hi,
how can I create SELECT … AS statements with a criteria?
like …
$criteria->select = "CONCAT(a,<img src='http://www.yiiframework.com/forum/public/style_emoticons/default/cool.gif' class='bbc_emoticon' alt='B)' /> AS c";
but this does not work.
Best regards,
schmunk
cyberpol
(Cyberpol 777)
2
Did you try to declare a public variable in the model that uses that criteria? (in this case the variable must be called $c)
schmunk
(Schmunk)
3
No, I just wanted to do some custom things in my SELECT statement, I do not want a public variable for that.
Maybe I have to stick with this:
http://www.yiiframework.com/doc/api/CActiveFinder#findAllBySql
bsander
(Sanderb)
4
You can probably do this with the combination of alias and CDbExpression.
mech7
(Chris De Kok)
5
mmm you ever find a solution? am hitting against the same wall
I dont see how alias or CDBExpression can help ?
butching
(Butching)
6
thanks Im having the same problem and now I can use the alias when I declared it as public variable on my model… thanks a lot
reed1
(Reed Topcoder)
7
Don’t know it was that easy lol, thanks