Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHP to SQL Server connection

Tags:

php

sql-server

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

As search through the web, I find out that there exists many different approaches (freeTDS, unixODBC, ODBTP, Easysoft ODBC, Easysoft ODBC-ODBC Bridge, PDO).

Could someone point me to the best solution for the specific connection?

like image 791
vagavan Avatar asked Nov 15 '22 07:11

vagavan


1 Answers

PDO is the preferred library a.t.m, with PDO_DBLIB (at least, for Linux), see here. if you need it portable between Linux & Windows, use PDO_ODBC.

like image 166
Wrikken Avatar answered Nov 17 '22 05:11

Wrikken