$query = ' Declare @MemCode Varchar(12);
Declare @ConCounter decimal(28,0);
Set @MemCode = null;
Set @ConCounter = null;
EXECUTE spQMInsEventMember_TMS
"'.$masterEventCode.'",
"'.$eventCode.'",
'.$memberContactTitle.',
"'.$guestFirstName.'",
"'.$guestLastName.'",
'.$address.',
'.$townDescription.',
'.$countryCode.',
'.$postZip.',
'.$STD.',
'.$phone.',
"'.$guestEmail.'",
'.$isMember.',
'.$divisionCode.',
'.$statusCode.',
'.$subStatusCode.',
'.$memberTypeCode.',
'.$memberTitles.',
'.$memberSubType.',
'.$classCode.',
'.$subClassCode.',@MemCode OUTPUT,@ConCounter OUTPUT;
SELECT @MemCode AS member_code;
SELECT @ConCounter AS contact_counter;';
//print_r($query);
$res = $this->dbh->query($query);
$result = $res->fetchAll();
print_r($result);
存储过程运行良好,如果我在 SQLSERVER 上运行它,我会得到 2 行。但是当我从 PHP 运行它时,我没有得到结果数组中返回的 member_code 或 contact_counter。
我究竟做错了什么?