From:             johnson at nicusa dot com
Operating system: Solaris 8
PHP version:      4.3.1
PHP Bug Type:     Feature/Change Request
Bug description:  Allow PHP to prepare Informix cursors with "placeholders"

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 bug report at http://bugs.php.net/?id=23019&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=23019&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=23019&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=23019&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=23019&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=23019&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=23019&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=23019&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=23019&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=23019&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=23019&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=23019&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=23019&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=23019&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=23019&r=gnused

Reply via email to