I want to use CakePHP to pull an array of photos from a database, sorted by photo header (0, 1, 2, 3 ...). Currently my query looks something like this:
$ss_photos = $this->Asset->find('all',array( 'conditions'=>array('kind'=>'photo'), 'order'=>'title' ));
Unfortunately, the names look in lowercase format, which leads to an undesirable sort order (2.jpg after 19.jpg, etc.). Is there a quick way to pass "title" as an int for ordering purposes in a Cake request of this type?
source share