CDbCriteria

What is alias property used for?

while constructing a sql query, it by default uses t for main table. But I wanted to alias it.

But, $criteria->alias=‘user’;

won’t actually replace t in a query. Then how to use alias? and what is it for?

i’m using CActiveDataProvider to list down users. Does it affect anyway?

Regards.

You may use it to alias related tables;

Yes I know that, I read docs. But the problem is, the query built is not reflecting the alias. It still uses t which is default!