News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Brian Swan's Blog:
Why Pass Parameters by Reference in the SQLSRV Driver?
November 25, 2010 @ 09:15:22

Brian Swaan has a new post to his blog talking about why you, in your SQL Server-based application, pass the parameters in by reference.

Last week at JumpIn Camp we spent quite a bit of time focusing on the SQL Server Driver for PHP. As developers worked to build SQL Server support into their applications, they had lots of questions about how both the SQLSRV and PDO_SQLSRV drivers work under the hood. One of the questions that came up was "When using the SQLSRV driver to execute parameterized queries, why do I have to pass parameters by reference?"

He includes a simple code example to show this passing by reference - first without it on the call to sqlsrv_prepare (and the warning message it gives) then the more correct version of passing in the past parameter by reference.

The SQL Server Driver for PHP team understands that passing parameters by reference is not ideal. [...] With that said, the team is continuing to investigate solutions that would produce expected behavior without passing parameters by reference.
0 comments voice your opinion now!
parameter passbyreference sqlservprepare sqlsrv driver


blog comments powered by Disqus

Similar Posts

Brian Swan's Blog: Version 3.0 (beta) of the SQL Server Drivers for PHP Released!

Brian Swan's Blog: Why Pass Parameters by Reference in the SQLSRV Driver?

Alexey Zakhlestin's Blog: PHP+SCGI part 2: problem with eZComponents

Christopher Jones' Blog: OCI8 is Leading DB Driver Code Coverage Numbers

Internet Super Hero Blog: Compiling mysqlnd with PHP 5.2/5.3/6.0


Community Events





Don't see your event here?
Let us know!


wordpress community symfony podcast code threedevsandamaybe developer configure api application release list language laravel install library interview series bugfix introduction

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework