Function addExpressionAttributeToSelect as defined in Mage_Eav_Model_Entity_Collection_Abstract (/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php) allows us to use MySQL functions in Magento collection. Here is an example of using MYSQL IN() clause in magenot more product collection at once :
Here is an example of using MySQL function CONCAT in Magento customer collection to concat customer’s firstname and lastname:
Here is another example which uses MySQL function MONTH which fetches only month from customer’s birth date.
Here is an example of using MySQL function CONCAT in Magento customer collection to concat customer’s firstname and lastname:
Here is another example which uses MySQL function MONTH which fetches only month from customer’s birth date.
No comments:
Post a Comment