Re: [PDO] Re: PHP + PDO + MSSQL
| From: | David Coallier | Date: | Tue, 19 Oct 2010 09:53:06 +0000 |
| Subject: | Re: [PDO] Re: PHP + PDO + MSSQL | ||
| References: | 1 2 | Groups: | php.pdo |
| Request: | Send a blank email to pdo+get-477@lists.php.net to get a copy of this message | ||
On 19 October 2010 03:51, Stanley Sufficool <ssufficool@gmail.com> 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 <bakers@canbytel.com> 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.
--
David Coallier