Modified the output param initial value
This commit is contained in:
parent
9a82e9daa3
commit
bca311081d
|
@ -487,7 +487,7 @@ void core_sqlsrv_bind_param( _Inout_ sqlsrv_stmt* stmt, _In_ SQLUSMALLINT param_
|
|||
// if it is boolean, set the lval to 0 or 1
|
||||
convert_to_long( param_z );
|
||||
buffer = ¶m_z->value;
|
||||
buffer_len = sizeof(int); //sizeof( Z_LVAL_P( param_z ));
|
||||
buffer_len = sizeof(int); // do not use size of a zend_long
|
||||
ind_ptr = buffer_len;
|
||||
if( direction != SQL_PARAM_INPUT ){
|
||||
// save the parameter so that 1) the buffer doesn't go away, and 2) we can set it to NULL if returned
|
||||
|
|
|
@ -9,14 +9,14 @@ PHPT_EXEC=true
|
|||
<?php require('skipif.inc'); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
/*
|
||||
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'LIN') {
|
||||
// This test fails in Linux (unixODBC issue) but not Windows or mac.
|
||||
// See VSO 3459 for details.
|
||||
// This test fails in Linux, but not Windows or mac. This test requires
|
||||
// unixODBC 2.3.4 or above (see the list of bug fixes in www.unixodbc.org
|
||||
echo "Done\n";
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
require_once('MsCommon.inc');
|
||||
|
||||
$connectionOptions = array("CharacterSet"=> "UTF-8", "ConnectionPooling"=>1);
|
||||
|
@ -65,8 +65,8 @@ if (!$stmt) {
|
|||
|
||||
$sql_callSP = "{call $procName(?)}";
|
||||
|
||||
// Initialize the output parameter
|
||||
$outParam = 1;
|
||||
// Initialize the output parameter to any number
|
||||
$outParam = -1;
|
||||
$params = array(array(&$outParam, SQLSRV_PARAM_OUT));
|
||||
$stmt = sqlsrv_query($conn, $sql_callSP, $params);
|
||||
if (!$stmt) {
|
||||
|
|
Loading…
Reference in a new issue