kla/php-activerecord — pull request #252 by CarlosBonetti (2013-01-28 12:23:18+00:00)
Title: Chain SQL queries

This is an implementation idea to support chain SQL select queries like proposed in #145.

I pretend to add scopes, default scopes and aliases like `MyModel::where(...)`, but before it I'd like to discuss with you guys if this is the best way of doing that.

The usage is like:
```php
MyModel::sql()->where(...)->limit(...)->order(...)->all();
```
What it does is update a SQLBuilder instance and execute it after the all() or first() method in the end of the query.

What do you think?