#23019 [Opn->Bgs]: Allow PHP to prepare Informix cursors with "placeholders"
| From: | pajoye@php.net | Date: | Mon, 04 May 2009 15:10:02 +0000 |
| Subject: | #23019 [Opn->Bgs]: Allow PHP to prepare Informix cursors with "placeholders" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-136742@lists.php.net to get a copy of this message | ||
ID: 23019
Updated by: pajoye@php.net
Reported By: johnson at nicusa dot com
-Status: Open
+Status: Bogus
Bug Type: Feature/Change Request
Operating System: Solaris 8
PHP Version: 4.3.1
New Comment:
Report IFX request via pecl.
Previous Comments:
------------------------------------------------------------------------
[2003-04-02 08:59:31] johnson at nicusa dot com
With many other languages that access an Informix database, a
placeholder (question mark) in the VALUES list is passed in a string as
an argument in the USING clause of the EXECUTE (or PUT) statement:
EXEC SQL PREPARE p FROM "INSERT INTO SomeTable VALUES(..., ?, ...)";
EXEC SQL EXECUTE p USING :very_long_string_variable;
The same technique works with UPDATE, of course. PHP doesn't accept
placeholders, so that's problematic. The ability to prepare a statement
one time at the beginning of say, a large load or update process or a
query used many times (probably happen more in CLI than CGI) is MUCH
more efficient, as the engine does not have to have PREPARE and FREE in
the loop every time the cursor is executed.
I suggest that the function ifx_prepare be changed to accept question
marks as placeholders in the query.
Then ifx_do could be coded to accept a series of arguments, or just an
array containing arguments in the proper order to populate the cursor
query before execution.
Thanks for your consideration. jj.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=23019&edit=1