I need to make connection in magento say a php file where i can make connection to MS SQL Server. can anyone please let me know how can i do this.
Magento – How to connect make MS Sql Server Connection in Magento
databasemagento-1.9magento-connectmssql
Best Answer
As Magento is heavily tied to MySQL you will need to use plain PHP or try it with the Zend Framework DB Adapter: Check out the
mssql_connect
function on php.net and Zend_Db_Adapter.Also you need to make sure the needed MSSQL extension is enabled in your php.ini file, for example
extension=php_mssql.dll
To store the username, password and host I suggest you use the same way in
app/etc/local.xml
just as Magento does it. You can then afterwards access the data in your PHP file.app/etc/local.xml
example:access the data from
local.xml
to use in your PHP script: