Query Magento database object oriented

Naturally you can query Magento database directly as described in my earlier post about querying Magento database. But a much smarter way is it, to use exiting Magento objects and constructs like that: <?php /** * Sets position (sort order) values for the given attribute for a given option value. Therefore the given store specific value […]

Debug database queries with parameters

Sometimes you have to query the database directly in your module. In these situations you can use the placeholder feature of the Zend_Db_Statement component. :placeholder will be replaced by the respective value when calling fetch on a Zend_Db_Adapter_Mysqli instance with an array of replacements for example. If you need to debug the query with all parameters in it, […]