I work primarly with PHP & MySQL, but I have a potential client with a MS SQL and ASP setup. Due to some complicated reasons and offline software integration, they need
Yes. As long as you have the php_mssql extension on your server, you can use the following common functions:
// Connect to mssql server
$handle = mssql_connect($host, $user, $pass) or die("Cannot connect to server");
// Select a database
$db = mssql_select_db($dn_name, $handle) or die("Cannot select database");
// Execute a query
$query = "SELECT * FROM users WHERE lname = 'Smith'";
$result = mssql_query($query);
// Iterate over results
while($row = mssql_fetch_array($result)) {
echo $row["id"];
}
Note: From PHP 5.3 this extension is not included (and probably not maintained). You can download and add it manually, or better use Microsoft drivers.