5

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?

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Sorry for the downvote, but noticed your comment was from 2010 and with MSSQL - PDO is experimental for MSSQL at the moment in 2012.
@Duniyadnd: afaik, it is still the preferred method. If you know a better / more preferred one please post the details to that as an answer.
0

The fact that PDO_DBLIB was (and still is) experimental discourage me from using it. I decided to start testing a solution using freeTDS, that seemed to be the simpliest method. It turned out to function excellent, for that specific connection's case and I implemented the final application using it.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.