With php 5.3 above, the php_mssql module php_mssql no longer supported for windows.
The solution is to download the MicroSoft PHP driver from http://www.microsoft.com/en-us/download/details.aspx?id=20098 .
This installer will extract the modul dll files into the php extension directory.
Include the correct version in php ini (e.g. for php 5.3 ThreadSafe):
extension=php_sqlsrv_53_ts.dll
After that, you can use adboDb again, but you should use mssqlnative as adodbtype. And the connection with ip and port did not work for me, but ipaddress\\SERVERNAME worked (see. Sample code)
<?php include("adodb5/adodb.inc.php"); //create an instance of the ADO connection object $conn =&ADONewConnection ('mssqlnative'); //define connection string, specify database driver // $conn->Connect('xxx.xxx.x.xxx:1400', 'user', 'password', 'DbName'); $conn->Connect('xxx.xxx.x.xxx\\SERVERNAME', 'user', 'password', 'DbName'); //declare the SQL statement that will query the database $query = "select * from table"; $rs = $conn->execute($query); //execute the SQL statement and return records $arr = $rs->GetArray(); print_r($arr); ?>
Radon8472
source share