Skip to content

Instantly share code, notes, and snippets.

@stajnert
Created April 2, 2013 08:33
Show Gist options
  • Save stajnert/5290789 to your computer and use it in GitHub Desktop.
Save stajnert/5290789 to your computer and use it in GitHub Desktop.
Get records first by slug = london, then rest
<?php
$this->locations = Doctrine_Core::getTable('location')
->createQuery('l')
->orderBy("CASE url_slug WHEN :slug THEN '' ELSE name END")
->execute(array('slug' => 'london'));
>?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment