如何在内部触发器中调用存储过程并在varible上设置值?

时间:2016-07-26 09:16:09

标签: mysql

//The capture of self here is coming in with your implicit property access of self.currentduration - you can't refer to self or properties on self from within a block that will be strongly retained by self.

//You can get around this by creating a weak reference to self before accessing timerDisp inside your block
__weak typeof(self) weakSelf = self;

self.timeObserverToken = [_player addPeriodicTimeObserverForInterval:interval queue:NULL usingBlock: ^(CMTime time)
{
    _currentDuration = (int)CMTimeGetSeconds (_player.currentTime);

    if(!_isPlaying)
    {
        _pausedDuration = _currentDuration;
    }
}

在上面的代码中,我试图在内部触发器中调用存储过程,我想设置变量。

DELIMITER $$ CREATE TRIGGER insert_trigger BEFORE INSERT ON Leave_applied_table FOR EACH ROW begin set mangerid= CALL Managers_SP (new.employee_id); insert into Leave_actula_table (Leave_actula_table.leave_applied_id,and so ON....) values(new.employee_id,new.leave_type_id) ; insert into Leave_approval_table (Leave_approval_table.leave_applied_id, and so on....) values (new.employee_id and so on; END; $$ DELIMITER ; )返回管理员ID,我想在CALL Managers_SP (new.employee_id中设置它。但它显示语法错误。

我怎么称呼它?

0 个答案:

没有答案