php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #74592 prepared statement support
Submitted: 2017-05-15 07:58 UTC Modified: -
From: adambaratz@php.net Assigned:
Status: Open Package: PDO DBlib
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: adambaratz@php.net
New email:
PHP Version: OS:

 

 [2017-05-15 07:58 UTC] adambaratz@php.net
Description:
------------
DBlib doesn't directly support prepared statements, but could get most of the way there using some generic stored procedures.

T-SQL offers sp_executesql:
https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-executesql-transact-sql

Sybase has options of its own:
http://stackoverflow.com/questions/5680960/equivalent-to-sp-executesql-in-sybase

These could likely be used in conjunction with dbbind(). If so, this would eliminate this extension's hard requirement for emulated prepares. Testing with SQL Server has shown that execution plans for queries executed with sp_executesql can be reused when the parameters change.


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed May 22 19:01:32 2019 UTC