Posted By

eden159 on 02/18/09


Tagged

sql php column custom propel


Versions (?)

Add custom column in Propel


 / Published in: PHP
 

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

  1. $c = new Criteria();
  2.  
  3. $c->addAsColumn('brandname', '(SELECT brand.name FROM brand WHERE brand.id=brand_id)');
  4.  
  5. $c->addAscendingOrderByColumn($c->getColumnForAs('brandname'));
  6.  
  7. $this->products = ProductPeer::doSelect($c);

Report this snippet  

You need to login to post a comment.