Here is a way to connect mssql database using Magento’s inbuilt models. Hope this is helpful
I am writing here an important code snippet for getting the database connection details used in Magento
Hello All, I am writing here an important code snippet for getting the table prefix (if any defined) in Magento.
I am writing here a small but useful snippet of code, for getting the table name of any module (whose table name are defined in config file). This is very useful when using joins in query. Suppose my module is ‘vendor’.
Hello All, When we are filtering data in Magento, time occurs when we want to fetch result after filters like Not equal, greater than, less than, etc. The addFieldToFilter method’s second parameter is used for this. It supports an alternate syntax where, instead of passing in a string, you pass in a single element Array. […]
Some of you might be knowing that there is a functionality in MySQL database for storing files and retrieving the same. This is mainly used when we need to reduce response time for retrieving and using files in our application. I am listing here the method for inserting image file in and retrieving image file […]
I am listing an example for retrieving the Joomla database prefix.
Joomla is a very great CMS. I am listing below important variable used in joomla. JPath is used to get the directory path. DS — is used as a directory separator. JPATH_ADMINISTRATOR– Sets the path to /Joomla/administrator JPATH_BASE — sets the entry to joomla /Joomla JPATH_CACHE –Sets the cache path /Joomla/cache JPATH_COMPONENT — Sets the […]
Some of you might have worked on Magento. I am listing here points for connecting another database from Magento. 1) Suppose your database for Magento Project is named ‘magento’. 2) There is one other database named ‘wp’. 3) For using this database inside Magento, you need to setup connection in ‘config.xml’ file which resides in […]