This function is for connecting to MSSQL (microsoft sql) in PHP
mssql_connect($servername, $username, $password);
This return the resource which can then be used in conjunction with queries.
<?php $server = 'localhost'; $username = 'root'; $password = '123abc';
$link = mssql_connect($server, $username, $password);
if(!$link){ die('Could not connect to MSSQL. Check servername, username and / or password'); } ?>
By PHPin24 @ 2009-07-20 20:46:17
|