How To Retrieve Mysql Computed/virtual Column

How can I retrieve ‘something’ value from this query?


$sql = "SELECT CONCAT('test1','test2') AS something FROM user LIMIT 1"

$result=User::model()->findBySql($sql);

when I tried to retrieve it, it gave me error: Property "User.something" is not defined.

Thanks in advance.

Just add something like


public $something;

to models/User.php

Wow… Thank you so much ORey, it works now.