herveguetin
5/26/2014 - 10:49 PM

Use mySQL expression in Magento collection select

Use mySQL expression in Magento collection select

<?php
Mage::getModel('my_model')
  ->getCollection()
  ->addAttributeToFilter('my_column', array('gt' => Zend_Db_Expr(MY_EXPRESSION)))
  ;