ID: 23019 Updated by: [email protected] 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
