Return to Snippet

Revision: 11779
at February 18, 2009 08:50 by eden159


Initial Code
$c = new Criteria();
 
$c->addAsColumn('brandname', '(SELECT brand.name FROM brand WHERE brand.id=brand_id)');
 
$c->addAscendingOrderByColumn($c->getColumnForAs('brandname'));
 
$this->products = ProductPeer::doSelect($c);

Initial URL
http://snippets.symfony-project.org/snippet/269

Initial Description

                                

Initial Title
Add custom column in Propel

Initial Tags
sql, php

Initial Language
PHP