Skip to content

Instantly share code, notes, and snippets.

@highruned
Created February 28, 2011 04:40
Show Gist options
  • Save highruned/846943 to your computer and use it in GitHub Desktop.
Save highruned/846943 to your computer and use it in GitHub Desktop.
$q1 = $application->db->createQuery('
select x
from Brain\Models\Blog x
where x.updated_at < :start_time
and x.state != :processing
order by x.updated_at
')->setMaxResults(1);
$q1->setParameters(array(
'start_time' => '1000-00-00 00:00:00',
'processing' => \Brain\Models\Blog::STATE_PROCESSING
));
$blogs = $q1->getResult();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment