|
本文实例讲述了PHP使用PDO调用mssql存储过程的方法。分享给大家供大家参考,具体如下:
数据库中已创建存储过程user_logon_check, PHP调用示例如下,
getMessage();
exit;
}
$username = '123';
$userpsw = '123';
//$xp_userlogon = $dbCon ->query("exec user_logon_check '$username','$userpsw'");
//mysql->call user_logon_check('$username','$userpsw');
//mysql->call user_logon_check(?,?)
$xp_userlogon = $dbCon->prepare('exec user_logon_check ?,?');
$xp_userlogon->bindParam(1,$username);
$xp_userlogon->bindParam(2,$userpsw);
$xp_userlogon->execute();
$uCol = $xp_userlogon->columnCount();
echo $uCol."
";
while($row = $xp_userlogon->fetch()){
for( $i=0; $i
|
|