lox / pheasant

A lightweight data mapper designed to take advantage of PHP 5.3+
http://getpheasant.com
MIT License
101 stars 21 forks source link

Support for GROUP BY and ORDER BY for queries #34

Closed dhotson closed 11 years ago

dhotson commented 11 years ago

Also, added support for ORDER BY in collections.

dhotson commented 11 years ago

Oops, forgot to commit test cases. One minute..

lox commented 11 years ago

Have you seen the work that @bjornpost did in #26?

lox commented 11 years ago

Think this is a simple and straight-forward solution for the moment.

dhotson commented 11 years ago

Some examples of usage:

Adding GROUP BY and ORDER BY clauses to queries:

$query = new \Pheasant\Query\Query();
$query->select('*')->from('blah')->groupBy('blahid')->orderBy('blahid desc');

Ordering Collections:

Blah::find()->orderBy('timecreated asc')