Re: [PDO] Re: PHP + PDO + MSSQL
[email protected] (Stanley Sufficool) Wed, 20 Oct 2010 20:06:27 -0700
| Newsgroups | php.pdo |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Oct 19, 2010 at 2:53 AM, David Coallier <[email protected]> wrote: > On 19 October 2010 03:51, Stanley Sufficool <[email protected]> wrote: >> mssql and PDO_DBLIB are equivalent in functionality in releases, so >> either should suffice. Be aware though that PDO_DBLIB does not support >> return parameters from stored procedures, but mssql does (mssql_init, >> mssql_bind). >> >> HOWEVER, only PDO_DBLIB supports very large recordsets in trunk. >> >> For general portability, not including any T-SQL specific code, I >> would use PDO_DBLIB over mssql since this is there I believe the >> database layers *should* be heading. >> >> On Mon, Oct 18, 2010 at 1:23 PM, Scott Baker <[email protected]> wrote: >>> I apologize if this is out of turn, but I'm trying to connect to a MSSQL >>> server via PDO. There isn't a lot of documentation about doing this out >>> there, but most of it seems to do point to using dblib (which you wrote part >>> of?). >>> >>> The PHP.net site has a big warning: >>> >>> "This extension is EXPERIMENTAL. The behaviour of this extension including >>> the names of its functions and any other documentation surrounding this >>> extension may change without notice in a future release of PHP. This >>> extension should be used at your own risk." >>> >>> What's the best way to connect to a MSSQL server with PHP right now? >>> I'm running PHP 5.3.3. >>> > > I would definitely go with taking a look at the PDO_Sqlsrv extension > which microsoft is actively working on. You can have some basic > documentation here and some code examples and whatnot: > > http://msdn.microsoft.com/en-US/library/cc296172%28v=SQL.90%29.aspx > > Hope this helps but this is definitely the most active and supported > PHP driver for sql server at the moment. When you are working on a Microsoft platform. For Linux, you will require mssql or PDO_DBLIB. > > -- > David Coallier >