by BrianKondalski 12 May 2014, 12:08
I should note the following is also working fine from a .php page now running through the web server as well. Host and login info changed to something generic of course. But the arrowroot install is still telling me the mssql extension is not installed. I'm missing something somewhere I assume!
<?php
$serverName = “AA.BB.CC.DD";
$connectionInfo = array( "Database"=>”dbname", "UID"=>”uname", "PWD"=>”password");
$conn = sqlsrv_connect( $serverName, $connectionInfo );
if( $conn === false ) {
die( print_r( sqlsrv_errors(), true));
}
$sql = "SELECT top 10 EMAIL, HANDLE FROM USERS";
$stmt = sqlsrv_query( $conn, $sql );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
while( $row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC) ) {
echo $row['EMAIL'].", ".$row['HANDLE']."<br />\n";
}
sqlsrv_free_stmt( $stmt);
?>