note 74628 rejected from function.mssql-bind by tularis
| From: | tularis@php.net | Date: | Fri, 20 Apr 2007 21:26:27 +0000 |
| Subject: | note 74628 rejected from function.mssql-bind by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-125717@lists.php.net to get a copy of this message | ||
Note Submitter: matthew dot vines at gmail dot com
----
How can we retrieve the value of output parameters since call-time pass by reference has been
deprecated? for instance, to get the ID back from an Insert stored procedure call I used to bind
the ID parameter like this:
mssql_bind($sp, '@id', &$this->_id, SQLINT4, true, false);
This is now a deprecated action. PHP effectively turns that call into
mssql_bind($sp, '@id', $this->_id, SQLINT4, true, false);
Which means I no longer get the output parameter back. I can't change the mssql_bind function
to declare the parameter to be passed by reference, so how do get the output parameter back? I am
aware of the php.ini setting that will allow call time pass by reference, but I want to conform to
php best practices, and feel that is a poor and lazy solution. Does anyone have any ideas?