Cml\Db\MySql\Pdo::callProcedure PHP Method

callProcedure() public method

调用存储过程
public callProcedure ( string $procedureName = '', array $bindParams = [], boolean | true $isSelect = true ) : array | integer
$procedureName string 要调用的存储过程名称
$bindParams array 绑定的参数
$isSelect boolean | true 是否为返回数据集的语句
return array | integer
    public function callProcedure($procedureName = '', $bindParams = [], $isSelect = true)
    {
        $this->bindParams = $bindParams;
        $stmt = $this->prepare("exec {$procedureName}");
        $this->execute($stmt);
        if ($isSelect) {
            return $stmt->fetchAll(\PDO::FETCH_ASSOC);
        } else {
            return $stmt->rowCount();
        }
    }