Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jahvi
Created November 1, 2015 11:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jahvi/12ee27a0e5dcf73abbe6 to your computer and use it in GitHub Desktop.
Save jahvi/12ee27a0e5dcf73abbe6 to your computer and use it in GitHub Desktop.
SQL statment filter
<?php
$expression = '(field1 - field2)';
$condition = $this->_getConditionSql($expression, array('eq' =>3 ));
$this->_select->where($condition);
// or..
$collection->addFieldToFilter('field', array('eq' => 3));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment