[PHP-DEV] patch: odbc_execute with output parameters From: Kees van Veen (cvn <email protected>)
Date: 04/07/00

Hi,

I'm a newbie in php 3 development, but I've made a patch in odbc_execute (php
3.0.16:unified_odbc.c) allowing for output parameters, but compatible with (i.e.
an extension of) the current API.

Here's the description of the attached patch:
if odbc_execute() is called with an array by reference then the output
parameters are
copied back into the array, if not, the old (current) situation applies.

Currently the way the array parameter is specified (by value of by reference) is
not tested and odbc_execute() works both ways. The patch tests how
odbc_execute() is called, and after execution copies the temporary array back
into the parameter array.

I've tested it both on Linux and MS-Windows and it seems to work, although I'm
not too sure about the call to 'pval_copy_constructor' and memory allocation,
etc. It seems to copy the entire array, but I don't know anything about PHP
internals, so maybe one of you gurus could enlighten me on this.

Kinds regards,
Kees van Veen

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>