Skip to content

Instantly share code, notes, and snippets.

@andreia
Created July 26, 2012 12:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save andreia/3181898 to your computer and use it in GitHub Desktop.
Save andreia/3181898 to your computer and use it in GitHub Desktop.
DOCTRINE 1.2: Returns a single value
<?php
$q = Doctrine_Query::create()
->select('a.title as title')
->from('Article a')
->where('a.id = ?', $this->getId());
->fetchOne()->title;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment