When you use the getSelect method, you getSelect Magento model collection interface. Sometimes this is the only way to get the exact selection request you want, but keep in mind that it cannot rot 100% with what the Magento model interface does.
When you use the bindParamater method, you are using the Magento model interface. I canโt talk with why it doesnโt work, but I suspect that the Zend picker and the Magento model collection objects bind their parameters at different times and differently.
To get the desired results, skip the bindParamater method and use a simpler parameter ? to replace the orWhere method.
$this->getSelect() ->where('main_table.x < 1') ->orWhere('(main_table.x - main_table.y) >= ?',$qty);
Alan storm
source share