PHP connection to SQL Server

I want to connect to SQL Server 2000 from PHP installed on a unix platform ( CentOs ) and be able to run queries (SELECT and UPDATE). The solution must support UTF-8 data .

As an Internet search, I found that there are many different approaches (freeTDS, unixODBC, ODBTP, Easysoft ODBC, Easysoft ODBC-ODBC Bridge, PDO).

Can someone point me to the best solution for a particular connection?

+5
source share
2 answers

The fact that PDO_DBLIB was (and still is) experimental prevents me from using it. I decided to start testing the solution using freeTDS, which seemed to be the easiest method. It turned out that it works fine for a specific connection case, and I used it using it.

0
source

PDOis the preferred atm library with PDO_DBLIB(at least for Linux) see here . if you need it portable between Linux and Windows usePDO_ODBC.

+1
source

All Articles