$params = array('host' => $config->actdatabase->host,
'username' => $config->actdatabase->username,
'password' => $config->actdatabase->password,
'dbname' => $config->actdatabase->database);
$db = Zend_Db::factory($config->actdatabase->type, $params);
try{
$stmt = $db->prepare('EXEC GetNextIdNumber \'customer\', ?');
$stmt->bindParam(1, $outCustId,
PDO::PARAM_STR|PDO::PARAM_INPUT_OUTPUT);
$stmt->execute();
// $stmt->fetchAll();
} catch (Exception $e) {
// Various logging code
}
Relevant bits:
PHP 5.2.4 Hosted on Windows
Apache/2.2.6 (Win32) PHP/5.2.4
Zend: 1.6.2
$outCustId is always null. I've looked at the SQL Profile SP trace and the
stored proc is getting called correctly and the return value is set, I just
can't get to it. Am I missing something really obvious?
--
View this message in context: http://www.nabble.com/MSSQL-Stored-Procs-and-Output-variables-tp21128387p21128387.html
Sent from the Zend DB mailing list archive at Nabble.com.
没有评论:
发表评论