Magento News
How to connect to the database in Magento?
I’m trying to build a simple Magento Module that needs to connect to the database at the start of each page request. All tables need to be accessible to it. I’ve been pulling my hair out trying to understand how to do it. The best I could figure out was that I need to set this in the config.xml file of my module, but exactly what that command is/how it may be used, i haven’t been able to figure out.
Can someone please guide me or show me how to accomplish this? If not, would it be too bad a practice to include a custom config.php file which connects to the database manually?
How to connect to the database in Magento?
Possibly Related Posts:
- Magento – ‘proceed to checkout’ button to go to login page if not logged in
- magento geolocation redirect
- Magento Post Image File Request
- How to get items from last order on login and clearing cart on logout?
- Fatal error Undefined class constant ‘METHOD_GUEST’ [Magento]
RSS Feed