Jump to content


This topic is now archived and is closed to further replies.


Can some help me with Microsoft SQL Server 2005 connection

Recommended Posts

I am creating a web site using Microsoft SQL Server 2005 and using php. before i used MYSQL and php and everything was fine but now i need to know how to change the connect code from the one i use with mysql to work with Microsoft SQL Server 2005.

here is the code i used first can someone show me the modification i need to make.


$db = mysql_connect("localhost", "root","") or die ("Connection to the db died");
mysql_select_db("lis",$db) or die ("connection to lis db died");


Share this post

Link to post
Share on other sites
In my code I just altered the mysql_connect to mssql_connect as well as mysql_select_db to mssql_select_db

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.