Revision #5 was created by yiqing95 on Dec 3, 2011, 3:56:36 AM.
add alias functionality then you can use in relation scenario without column name conflict. and you can config an different name from 'CreateAt'
Content
[...]
}
```
That's it. Our named scope is ready to use with `Post`. Feel free to improve the above code or come up with your own ideas for named scopes that are good candidates for a behavior.
some improvement:
```php
class BetweenBehavior extends CActiveRecordBehavior
{
/**
* @var string
* here you can config it if you have a different name from 'CreateAt'
*/
public $attrCreateAt = 'CreatedAt ';
/**
* @param $start
* @param $end
* @param null $alias
* you can specify an alias here which can be the current ActiveRecord( normally is 't') or relation Ar 's alias(the relation name)