Archive of Magento’s queries

Asked

Viewed 29 times

0

Good afternoon, I would like to know where is the file that makes the querys in Magento. I use version 1.9.

1 answer

0


The class that executes queries depends on the driver that is configured in Magento. If you are using mysqli it would be in this class: https://github.com/OpenMage/magento-mirror/blob/magento-1.9/lib/Zend/Db/Statement/Mysqli.php

Queries are generated in different parts of the system, but are usually represented not with SQL directly, but through Collections. The Mage_catalog_model_resource_product_collection class for example can be used to fetch products, and this class inherits from generic Collection, which in turn uses Zend_db_select to build the query.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.