Hi, i'm in new PHP. but i need to connect MSSQL WITH PHP. anyone help for how to connect php with sql server 2008. what are step to follow and what are the version need inform. Kindly give the details. Balaji V
The code below connects to a database and executes an SQL statement: $link = mssql_connect('.\SQLEXPRESS', 'sa', 'password'); if (!$link) { die('Unable to connect to server!'); } if (!mssql_select_db('database_name', $link)) { die('Unable to select database!'); } $result = mssql_query('SELECT * FROM database_name'); $row = mssql_fetch_array($result); echo $row[0]; //print the first field of the first record PHP: